本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.refresh方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.refresh方法的具体用法?Java WorkflowDocument.refresh怎么用?Java WorkflowDocument.refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.refresh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRecallDoesNotRecallDocumentWhenProcessed
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Test
public void testRecallDoesNotRecallDocumentWhenProcessed() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(EWESTFAL, RECALL_TEST_DOC);
document.route("");
for (String user: new String[] { JHOPF, EWESTFAL, RKIRKEND, NATJOHNS, BMCGOUGH }) {
document = WorkflowDocumentFactory.loadDocument(user, document.getDocumentId());
document.approve("");
}
document.refresh();
assertTrue("Document should be processed", document.isProcessed());
assertTrue("Document should be approved", document.isApproved());
assertFalse("Document should not be final", document.isFinal());
document = WorkflowDocumentFactory.loadDocument(EWESTFAL, document.getDocumentId());
document.recall("recalling when processed should not recall the document", true);
Map<String, List<ErrorMessage>> errorMessages = GlobalVariables.getMessageMap().getErrorMessages();
assertTrue(errorMessages.size() == 1);
for (Map.Entry<String, List<ErrorMessage>> errorMessage : errorMessages.entrySet()) {
assertTrue(errorMessage.getValue().get(0).getErrorKey().equals(RiceKeyConstants.MESSAGE_RECALL_NOT_SUPPORTED));
}
// Verify the document status is still PROCESSED
assertTrue("Document should be processed", document.isProcessed());
assertTrue("Document should be approved", document.isApproved());
assertFalse("Document should not be final", document.isFinal());
GlobalVariables.getMessageMap().clearErrorMessages();
}