本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.superUserTakeRequestedAction方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.superUserTakeRequestedAction方法的具体用法?Java WorkflowDocument.superUserTakeRequestedAction怎么用?Java WorkflowDocument.superUserTakeRequestedAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.superUserTakeRequestedAction方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSuperUserActionsOnEnroute
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的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: testSuperUserActionsOnFinal
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Test public void testSuperUserActionsOnFinal() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), "SuperUserApproveActionRequestFyiTest");
document.adHocToPrincipal(ActionRequestType.FYI, "", getPrincipalIdForName("rkirkend"), "", true);
document.route("");
// doc should still be final
assertEquals("Document should be FINAL", DocumentStatus.FINAL, document.getStatus());
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(getPrincipalIdForName("ewestfal"), 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());
}
示例3: testSuperUserActionRoutesDocument
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
private String testSuperUserActionRoutesDocument(String documentType) throws Exception {
String ewestfalPrincipalId = getPrincipalIdForName("ewestfal");
WorkflowDocument document = WorkflowDocumentFactory.createDocument(ewestfalPrincipalId, documentType);
document.saveDocument("");
// doc should saved
assertEquals("Document should be SAVED", DocumentStatus.SAVED, document.getStatus());
document = WorkflowDocumentFactory.loadDocument(ewestfalPrincipalId, document.getDocumentId());
assertTrue("ewestfal should have Complete request", document.isCompletionRequested());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertFalse("rkirkend should not have Complete request", document.isCompletionRequested());
assertFalse("rkirkend should not have Approve request", document.isApprovalRequested());
assertTrue("rkirkend should be a super user of the document", document.isValidAction(ActionType.SU_APPROVE));
List<ActionRequestValue> actionRequests = KEWServiceLocator.getActionRequestService().findAllValidRequests(ewestfalPrincipalId, document.getDocumentId(), KewApiConstants.ACTION_REQUEST_COMPLETE_REQ);
assertEquals("There should only be 1 complete request to ewestfal as result of the save.", 1, actionRequests.size());
document.superUserTakeRequestedAction(actionRequests.get(0).getActionRequestId().toString(), "");
// Complete should no longer be requested
document = WorkflowDocumentFactory.loadDocument(ewestfalPrincipalId, document.getDocumentId());
assertFalse("ewestfal should not have Complete request", document.isCompletionRequested());
return document.getDocumentId();
}
示例4: testSuperUserActionsOnProcessed
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Test public void testSuperUserActionsOnProcessed() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), "SuperUserApproveActionRequestFyiTest");
document.adHocToPrincipal(ActionRequestType.ACKNOWLEDGE, "", getPrincipalIdForName("jhopf"), "", true);
document.adHocToPrincipal(ActionRequestType.FYI, "", getPrincipalIdForName("rkirkend"), "", true);
document.route("");
// doc should still be processed
assertEquals("Document should be PROCESSED", DocumentStatus.PROCESSED, document.getStatus());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertTrue("rkirkend should have an FYI request.", document.isFYIRequested());
String rkirkendPrincipalId = getPrincipalIdForName("rkirkend");
List<ActionRequestValue> fyiActionRequests = KEWServiceLocator.getActionRequestService().findAllValidRequests(rkirkendPrincipalId, document.getDocumentId(), KewApiConstants.ACTION_REQUEST_FYI_REQ);
assertEquals("There should only be 1 fyi request to rkirkend.", 1, fyiActionRequests.size());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
document.superUserTakeRequestedAction(fyiActionRequests.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 processed
assertEquals("Document should be PROCESSED", DocumentStatus.PROCESSED, document.getStatus());
String jhopfPrincipalId = getPrincipalIdForName("jhopf");
List<ActionRequestValue> ackActionRequests = KEWServiceLocator.getActionRequestService().findAllValidRequests(jhopfPrincipalId, document.getDocumentId(), KewApiConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ);
assertEquals("There should only be 1 ACK request to jhopf.", 1, ackActionRequests.size());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
document.superUserTakeRequestedAction(ackActionRequests.get(0).getActionRequestId().toString(), "");
// ACK should no longer be requested
document = WorkflowDocumentFactory.loadDocument(jhopfPrincipalId, document.getDocumentId());
assertFalse("jhopf should no longer have an ACK request.", document.isAcknowledgeRequested());
// doc should be final
assertEquals("Document should be FINAL", DocumentStatus.FINAL, document.getStatus());
}
示例5: testSavedDocumentSuperUserAdhocActionsApprove
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Test public void testSavedDocumentSuperUserAdhocActionsApprove() throws Exception {
String initiatorNetworkId = "ewestfal";
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName(initiatorNetworkId), "SuperUserApproveActionRequestFyiTest");
String adhocActionUserNetworkId = "jhopf";
document.adHocToPrincipal(ActionRequestType.APPROVE, "", getPrincipalIdForName(adhocActionUserNetworkId), "", true);
document.saveDocument("");
// doc should be saved
assertEquals("Document should be SAVED", DocumentStatus.SAVED, document.getStatus());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
assertTrue("ewestfal should have Complete request", document.isCompletionRequested());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertFalse("rkirkend should not have Complete request", document.isCompletionRequested());
assertFalse("rkirkend should not have Approve request", document.isApprovalRequested());
assertTrue("rkirkend should be a super user of the document", document.isValidAction(ActionType.SU_APPROVE));
String adhocPrincipalId = getPrincipalIdForName(adhocActionUserNetworkId);
List<ActionRequestValue> actionRequests = KEWServiceLocator.getActionRequestService().findAllValidRequests(adhocPrincipalId, document.getDocumentId(), ActionRequestType.APPROVE.getCode());
assertEquals("There should only be 1 approve request to " + adhocActionUserNetworkId + ".", 1, actionRequests.size());
document.superUserTakeRequestedAction(actionRequests.get(0).getActionRequestId().toString(), "");
// approve should no longer be requested
document = WorkflowDocumentFactory.loadDocument(adhocPrincipalId, document.getDocumentId());
assertFalse(adhocPrincipalId + " should not have approve request", document.isApprovalRequested());
// complete should no longer be requested
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName(initiatorNetworkId), document.getDocumentId());
assertTrue(initiatorNetworkId + " should not have complete request", document.isCompletionRequested());
// doc should still be saved
assertEquals("Document should be SAVED", DocumentStatus.SAVED, document.getStatus());
}