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


Java RouteNode.getNextDocStatus方法代碼示例

本文整理匯總了Java中org.kuali.rice.kew.engine.node.RouteNode.getNextDocStatus方法的典型用法代碼示例。如果您正苦於以下問題:Java RouteNode.getNextDocStatus方法的具體用法?Java RouteNode.getNextDocStatus怎麽用?Java RouteNode.getNextDocStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kuali.rice.kew.engine.node.RouteNode的用法示例。


在下文中一共展示了RouteNode.getNextDocStatus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testLoadDocWithAppDocStatus

import org.kuali.rice.kew.engine.node.RouteNode; //導入方法依賴的package包/類
@Test public void testLoadDocWithAppDocStatus() throws Exception {
    loadXmlFile("TestKEWAppDocStatus.xml");
    DocumentType documentType = KEWServiceLocator.getDocumentTypeService().findByName("TestAppDocStatusDoc2");
    
    // verify DocumentStatusPolicy = "APP"
    assertFalse("DocumentStatusPolicy should not be set to KEW, or BOTH", documentType.isKEWStatusInUse());
    assertTrue("DocumentStatusPolicy should be set to APP", documentType.isAppDocStatusInUse());
    
    // verify Valid Statuses defined
    assertTrue("6 Valid Application Statuses should be defined", documentType.getValidApplicationStatuses().size() == 6);
    Iterator<ApplicationDocumentStatus> iter = documentType.getValidApplicationStatuses().iterator();
    while (iter.hasNext()){
    	ApplicationDocumentStatus myStatus = iter.next();
    	String myStatusName = myStatus.getStatusName();
    	assertTrue("Valid Status value is incorrect: " + myStatusName,
    			("Approval In Progress".equalsIgnoreCase(myStatusName) ||
    			"Submitted".equalsIgnoreCase(myStatusName) ||
    			"Pending".equalsIgnoreCase(myStatusName) ||
    			"Completed".equalsIgnoreCase(myStatusName) ||
    			"Approved".equalsIgnoreCase(myStatusName) ||
    			"Rejected".equalsIgnoreCase(myStatusName) ));
    }
    
    //verify next_doc_status in RouteNode
    List procs = documentType.getProcesses();
    ProcessDefinitionBo myProc = (ProcessDefinitionBo) procs.get(0);
    RouteNode myNode = myProc.getInitialRouteNode();
    String nextDocStatus = myNode.getNextDocStatus();
    assertTrue("RouteNode nextDocStatus is Invalid", "Approval in Progress".equalsIgnoreCase(nextDocStatus));

    // Test that a document type with app doc status categories has the configured structure
    DocumentType documentType4 = KEWServiceLocator.getDocumentTypeService().findByName("TestAppDocStatusDoc4");
    List<ApplicationDocumentStatusCategory> categories = documentType4.getApplicationStatusCategories();
    assertTrue(2 == categories.size());
    assertTrue(9 == documentType4.getValidApplicationStatuses().size());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:37,代碼來源:DocumentTypeXmlParserTest.java


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