本文整理汇总了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());
}
示例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");
}
}
}
示例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");
}
}
}
示例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) {
}
}
示例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) {
}
}
示例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());
}
示例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());
}
示例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());
}
示例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) {
}
}
示例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());
}
示例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());
}
示例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");
}
}
}
示例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) {
}
}
示例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());
}
示例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());
}