本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.superUserDisapprove方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.superUserDisapprove方法的具体用法?Java WorkflowDocument.superUserDisapprove怎么用?Java WorkflowDocument.superUserDisapprove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.superUserDisapprove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: superUserDisapprove
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
protected void superUserDisapprove(boolean notify) throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), notify ? DOC_TYPE_WITH_NOTIFY: DOC_TYPE);
document.route("");
WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId()).approve("");
WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId()).approve("");
WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId()).approve("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId());
assertTrue("WorkflowDocument should indicate jhopf as SuperUser", document.isValidAction(ActionType.SU_DISAPPROVE));
document.superUserDisapprove("");
assertTrue("Document should be final after Super User Disapprove", document.isDisapproved());
if (notify) {
assertTrue(WorkflowDocumentFactory.loadDocument(document.getInitiatorPrincipalId(), document.getDocumentId()).isAcknowledgeRequested());
assertTrue(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId()).isAcknowledgeRequested());
assertTrue(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId()).isAcknowledgeRequested());
// jhopf took the super user action so should not be notified of disapproval (see KULRICE-752)
assertFalse(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId()).isAcknowledgeRequested());
}
}
示例2: superUserInitiatorDisapprove
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
protected void superUserInitiatorDisapprove(boolean notify) throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), notify ? DOC_TYPE_WITH_NOTIFY: DOC_TYPE);
document.route("");
WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId()).approve("");
WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId()).approve("");
WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId()).approve("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId());
assertTrue("WorkflowDocument should indicate ewestfal as SuperUser", document.isValidAction(ActionType.SU_DISAPPROVE));
document.superUserDisapprove("");
assertTrue("Document should be final after Super User Disapprove", document.isDisapproved());
if (notify) {
assertTrue(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId()).isAcknowledgeRequested());
assertTrue(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jhopf"), document.getDocumentId()).isAcknowledgeRequested());
// initiator doesn't get Ack for their own action
assertFalse(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId()).isAcknowledgeRequested());
}
}
示例3: superUserDisapprove
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Override
public void superUserDisapprove(WorkflowDocument workflowDocument, String annotation) throws WorkflowException {
if ( LOG.isInfoEnabled() ) {
LOG.info("super user disapprove document(" + workflowDocument.getDocumentId() + ",'" + annotation + "')");
}
workflowDocument.superUserDisapprove(annotation);
}
示例4: superUserInitiatorImmediateDisapprove
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
protected void superUserInitiatorImmediateDisapprove(boolean notify) throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), notify ? DOC_TYPE_WITH_NOTIFY: DOC_TYPE);
assertTrue("WorkflowDocument should indicate ewestfal as SuperUser", document.isValidAction(ActionType.SU_DISAPPROVE));
document.superUserDisapprove("");
assertTrue("Document should be final after Super User Disapprove", document.isDisapproved());
// initiator doesn't get Ack for their own action
assertFalse(WorkflowDocumentFactory.loadDocument(document.getInitiatorPrincipalId(), document.getDocumentId()).isAcknowledgeRequested());
assertFalse(WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), document.getDocumentId()).isAcknowledgeRequested());
}
示例5: testSuperUserDisapproveInvalidUser
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的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) {
}
}