当前位置: 首页>>代码示例>>Java>>正文


Java WorkflowDocument.superUserDisapprove方法代码示例

本文整理汇总了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());
       }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:SuperUserDisapproveTest.java

示例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());
       }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:SuperUserDisapproveTest.java

示例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);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:WorkflowDocumentServiceImpl.java

示例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());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:SuperUserDisapproveTest.java

示例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) {
       }
       
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:SuperUserDisapproveTest.java


注:本文中的org.kuali.rice.kew.api.WorkflowDocument.superUserDisapprove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。