當前位置: 首頁>>代碼示例>>Java>>正文


Java NotifySetup類代碼示例

本文整理匯總了Java中org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup的典型用法代碼示例。如果您正苦於以下問題:Java NotifySetup類的具體用法?Java NotifySetup怎麽用?Java NotifySetup使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NotifySetup類屬於org.kuali.rice.kew.actions.BlanketApproveTest包,在下文中一共展示了NotifySetup類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testSuperUserActionsOnEnroute

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testSuperUserActionsOnEnroute() throws Exception {
    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
    document.adHocToPrincipal(ActionRequestType.FYI, "", getPrincipalIdForName("rkirkend"), "", true);
    document.adHocToPrincipal(ActionRequestType.APPROVE, "", getPrincipalIdForName("jhopf"), "", true);
    document.route("");

    document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
    assertTrue("rkirkend should have an FYI request.", document.isFYIRequested());

    String rkirkendPrincipalId = getPrincipalIdForName("rkirkend");
    List<ActionRequestValue> actionRequests = KEWServiceLocator.getActionRequestService().findAllValidRequests(rkirkendPrincipalId, document.getDocumentId(), KewApiConstants.ACTION_REQUEST_FYI_REQ);
    assertEquals("There should only be 1 fyi request to rkirkend.", 1, actionRequests.size());
    document = WorkflowDocumentFactory.loadDocument(rkirkendPrincipalId, document.getDocumentId());
    document.superUserTakeRequestedAction(actionRequests.get(0).getActionRequestId().toString(), "");

    // FYI should no longer be requested
    document = WorkflowDocumentFactory.loadDocument(rkirkendPrincipalId, document.getDocumentId());
    assertFalse("rkirkend should no longer have an FYI request.", document.isFYIRequested());

    // doc should still be enroute
    assertTrue("Document should still be ENROUTE", document.isEnroute());

}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:24,代碼來源:SuperUserActionRequestApproveEventTest.java

示例2: testSuperUserApprove

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testSuperUserApprove() throws Exception {
       WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
       document.route("");
       
       document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId());
       assertTrue("WorkflowDocument should indicate jhopf as SuperUser", document.isValidAction(ActionType.SU_BLANKET_APPROVE));
       document.superUserBlanketApprove("");
       assertTrue("Document should be 'processed' after Super User Approve", document.isProcessed());
       List<ActionRequestValue> requests = KEWServiceLocator.getActionRequestService().findPendingByDoc(document.getDocumentId());
       assertTrue("Should be active requests still", requests.size() == 2);//number of acks and fyi's configured through rules
       for ( ActionRequestValue request : requests ) {
		if (request.isApproveOrCompleteRequest()) {
			fail("There should be no approve or complete requests after su approve");
		}
	}
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:17,代碼來源:SuperUserActionTest.java

示例3: testSuperUserApprove

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testSuperUserApprove() throws Exception {
       WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
       document.route("");
       
       document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId());
       assertTrue("WorkflowDocument should indicate jhopf as SuperUser", document.isValidAction(ActionType.SU_BLANKET_APPROVE));
       document.superUserBlanketApprove("");
       assertTrue("Document should be 'processed' after Super User Approve", document.isProcessed());
       List requests = KEWServiceLocator.getActionRequestService().findPendingByDoc(document.getDocumentId());
       assertTrue("Should be active requests still", requests.size() == 2);//number of acks and fyi's configured through rules
       for (Iterator iter = requests.iterator(); iter.hasNext();) {
		ActionRequestValue request = (ActionRequestValue) iter.next();
		if (request.isApproveOrCompleteRequest()) {
			fail("There should be no approve or complete requests after su approve");
		}
	}
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:18,代碼來源:SuperUserActionTest.java

示例4: testInitiatorOnlyCancel

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testInitiatorOnlyCancel() throws Exception {
    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
    
    document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("user1"), document.getDocumentId());
    try {
        document.cancel("");
        fail("Document should not be allowed to be cancelled due to initiator check.");
    } catch (Exception e) {
        
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:12,代碼來源:CancelActionTest.java

示例5: testSuperUserDisapproveInvalidUser

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testSuperUserDisapproveInvalidUser() throws Exception {
	WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
       document.route("");
       
       document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("quickstart"), document.getDocumentId());
       try {
       	assertFalse("WorkflowDocument should not indicate quickstart as SuperUser", document.isValidAction(ActionType.SU_DISAPPROVE));
       	document.superUserDisapprove("");
       	fail("invalid user attempted to SuperUserApprove");
       } catch (Exception e) {
       }
       
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:SuperUserDisapproveTest.java

示例6: testSuperUserCancel

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test
   public void testSuperUserCancel() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
document.route("");

document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId());
assertTrue("WorkflowDocument should indicate jhopf as SuperUser", document.isValidAction(ActionType.SU_CANCEL));
document.superUserCancel("");
assertTrue("Document should be final after Super User Cancel", document.isCanceled());
   }
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:11,代碼來源:SuperUserCancelTest.java

示例7: testSuperUserInitiatorCancel

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test
   public void testSuperUserInitiatorCancel() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
assertTrue("WorkflowDocument should indicate ewestfal as SuperUser", document.isValidAction(ActionType.SU_CANCEL));
document.superUserCancel("");
assertTrue("Document should be final after Super User Cancel", document.isCanceled());
   }
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:SuperUserCancelTest.java

示例8: testSuperUserNonInitiatorCancel

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test
   public void testSuperUserNonInitiatorCancel() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("delyea"), NotifySetup.DOCUMENT_TYPE_NAME);
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
assertTrue("WorkflowDocument should indicate ewestfal as SuperUser", document.isValidAction(ActionType.SU_CANCEL));
document.superUserCancel("");
assertTrue("Document should be final after Super User Cancel", document.isCanceled());
   }
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:SuperUserCancelTest.java

示例9: testSuperUserCancelInvalidUser

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test
   public void testSuperUserCancelInvalidUser() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
document.route("");

document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("quickstart"), document.getDocumentId());
try {
    assertFalse("WorkflowDocument should not indicate quickstart as SuperUser", document.isValidAction(ActionType.SU_CANCEL));
    document.superUserCancel("");
    fail("invalid user attempted to SuperUserApprove");
} catch (Exception e) {
}

   }
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:15,代碼來源:SuperUserCancelTest.java

示例10: testLogAnnotation

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testLogAnnotation() throws Exception {
    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
    Collection actionsTaken = KEWServiceLocator.getActionTakenService().findByDocumentId(document.getDocumentId());
    assertEquals(0, actionsTaken.size());
    
    document.logAnnotation("going to route doc");
    actionsTaken = KEWServiceLocator.getActionTakenService().findByDocumentId(document.getDocumentId());
    assertEquals(1, actionsTaken.size());
    ActionTakenValue actionTaken = (ActionTakenValue) actionsTaken.iterator().next();
    assertTrue(actionTaken.getCurrentIndicator());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:12,代碼來源:LogDocumentActionTest.java

示例11: testInitiatorDisapprove

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
/**
 * Tests whether the initiator who disapproved a doc gets an acknowledgement
 * 
 */
@Test public void testInitiatorDisapprove() throws WorkflowException {
    // test initiator disapproval, via normal request with forceAction=true
    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
    document.route("");

    document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
    document.disapprove("");

    document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
    assertFalse("Initiator should not have an Ack request from disapproval because they were the disapprover user", document.isAcknowledgeRequested());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:16,代碼來源:DisapproveActionTest.java

示例12: testSuperUserInitiatorApprove

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testSuperUserInitiatorApprove() throws Exception {
	WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
       assertTrue("WorkflowDocument should indicate ewestfal as SuperUser", document.isValidAction(ActionType.SU_BLANKET_APPROVE));
       document.superUserBlanketApprove("");
       assertEquals("Document status incorrect after super user approve", DocumentStatus.PROCESSED, document.getStatus());
       List<ActionRequestValue> requests = KEWServiceLocator.getActionRequestService().findPendingByDoc(document.getDocumentId());
       assertEquals("Should be active requests still", 2, requests.size() );//number of acks and fyi's configured through rules
       for (ActionRequestValue request: requests) {
		if (request.isApproveOrCompleteRequest()) {
			fail("There should be no approve or complete requests after su approve");
		}
	}
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:SuperUserActionTest.java

示例13: testSuperUserApproveInvalidUser

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testSuperUserApproveInvalidUser() throws Exception {
	WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
       document.route("");
       
       document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("quickstart"), document.getDocumentId());
       try {
       	assertFalse("WorkflowDocument should not indicate quickstart as SuperUser", document.isValidAction(ActionType.SU_BLANKET_APPROVE));
       	document.superUserBlanketApprove("");
       	fail("invalid user attempted to SuperUserApprove");
       } catch (Exception e) {
       }
       
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:SuperUserActionTest.java

示例14: testLogAnnotation

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
@Test public void testLogAnnotation() throws Exception {
    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
    Collection actionsTaken = KEWServiceLocator.getActionTakenService().getActionsTaken(document.getDocumentId());
    assertEquals(0, actionsTaken.size());
    
    document.logAnnotation("going to route doc");
    actionsTaken = KEWServiceLocator.getActionTakenService().getActionsTaken(document.getDocumentId());
    assertEquals(1, actionsTaken.size());
    ActionTakenValue actionTaken = (ActionTakenValue) actionsTaken.iterator().next();
    assertTrue(actionTaken.getCurrentIndicator());
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:12,代碼來源:LogDocumentActionTest.java

示例15: testInitiatorDisapprove

import org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup; //導入依賴的package包/類
/**
 * Tests whether the initator who disapproved a doc gets an acknowledgement
 * 
 */
@Ignore("This test will fail until KULRICE-752 is resolved")
@Test public void testInitiatorDisapprove() throws WorkflowException {
    // test initiator disapproval, via normal request with forceAction=true
    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), NotifySetup.DOCUMENT_TYPE_NAME);
    document.route("");

    document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
    document.disapprove("");

    document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
    assertFalse("Initiator should not have an Ack request from disapproval because they were the disapprover user", document.isAcknowledgeRequested());
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:17,代碼來源:DisapproveActionTest.java


注:本文中的org.kuali.rice.kew.actions.BlanketApproveTest.NotifySetup類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。