本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.fyi方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.fyi方法的具体用法?Java WorkflowDocument.fyi怎么用?Java WorkflowDocument.fyi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.fyi方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearAllFyisAndAcknowledgeNotificationWorkflowDocument
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.ken.service.NotificationWorkflowDocumentService#clearAllFyisAndAcknowledgeNotificationWorkflowDocument(java.lang.String,
* org.kuali.rice.ken.document.kew.NotificationWorkflowDocument, java.lang.String)
*/
public void clearAllFyisAndAcknowledgeNotificationWorkflowDocument(String initiatorUserId,
WorkflowDocument workflowDocument, String annotation) {
List<ActionRequest> reqs = workflowDocument.getRootActionRequests();
for (int i = 0; i < reqs.size(); i++) {
LOG.info("Action Request[" + i + "] = " + reqs.get(i).getActionRequested());
if (reqs.get(i).getActionRequested().equals(ActionRequestType.ACKNOWLEDGE)) {
workflowDocument.acknowledge(annotation);
} else if (reqs.get(i).getActionRequested().equals(ActionRequestType.FYI)) {
workflowDocument.logAnnotation(annotation);
workflowDocument.fyi();
} else {
throw new WorkflowRuntimeException("Invalid notification action request in workflow document ("
+ workflowDocument.getDocumentId()
+ ") was encountered. Should be either an acknowledge or fyi and was not.");
}
}
}
示例2: clearFyi
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Override
public void clearFyi(WorkflowDocument workflowDocument, List<AdHocRouteRecipient> adHocRecipients) throws WorkflowException {
if (LOG.isDebugEnabled()) {
LOG.debug("clearing FYI for document(" + workflowDocument.getDocumentId() + ")");
}
handleAdHocRouteRequests(workflowDocument, "", filterAdHocRecipients(adHocRecipients, new String[] { KewApiConstants.ACTION_REQUEST_FYI_REQ }));
workflowDocument.fyi();
}
示例3: dismissMessageDelivery
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.ken.deliverer.NotificationMessageDeliverer#dismissMessageDelivery(org.kuali.rice.ken.bo.NotificationMessageDelivery,
* java.lang.String, java.lang.String)
*/
public void dismissMessageDelivery(NotificationMessageDelivery messageDelivery, String user, String cause) {
// TODO: move hardcoded web controller actions here...
LOG.info("Dismissing as user '" + user + "' workflow document '" + messageDelivery.getDeliverySystemId()
+ "' corresponding to message delivery #" + messageDelivery.getId() + " due to cause: " + cause);
if (NotificationConstants.AUTO_REMOVE_CAUSE.equals(cause)) {
// perform an auto-remove
// XXX: currently auto-removes are going through autoremove method
} else {
WorkflowDocument nwd;
nwd = notificationWorkflowDocumentService.getNotificationWorkflowDocumentByDocumentId(user,
messageDelivery.getDeliverySystemId());
flagWorkflowDocument(nwd);
if (NotificationConstants.ACK_CAUSE.equals(cause)) {
// moved from NotificationController, ack command
/*
* acknowledge using workflow docId
*/
if (nwd.isAcknowledgeRequested()) {
nwd.acknowledge("This notification has been acknowledged.");
LOG.debug("acknowledged " + nwd.getTitle());
LOG.debug("status display value: " + nwd.getStatus().getLabel());
} else {
LOG.debug("Acknowledgement was not needed for document " + nwd.getDocumentId());
}
} else if (NotificationConstants.FYI_CAUSE.equals(cause)) {
// moved from NotificationController, fyi command
/*
* FYI using workflow docId
*/
if (nwd.isFYIRequested()) {
nwd.fyi();
LOG.debug("fyi " + nwd.getTitle());
LOG.debug("status display value: " + nwd.getStatus().getLabel());
} else {
LOG.debug("FYI was not needed for document " + nwd.getDocumentId());
}
}
}
}
示例4: testRecallDoesNotRecallDocumentWhenFinal
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
@Test
public void testRecallDoesNotRecallDocumentWhenFinal() 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 = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("xqi"), document.getDocumentId());
document.acknowledge("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("jthomas"), document.getDocumentId());
document.fyi();
for (ActionRequest a: document.getRootActionRequests()) {
System.err.println(a);
if (a.isAcknowledgeRequest() || a.isFyiRequest()) {
System.err.println(a.getPrincipalId());
System.err.println(KimApiServiceLocator.getIdentityService().getPrincipal(a.getPrincipalId()).getPrincipalName());
}
}
assertFalse("Document should not be processed", document.isProcessed());
assertTrue("Document should be approved", document.isApproved());
assertTrue("Document should be final", document.isFinal());
document = WorkflowDocumentFactory.loadDocument(EWESTFAL, document.getDocumentId());
document.recall("recalling when final 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 FINAL
assertFalse("Document should not be processed", document.isProcessed());
assertTrue("Document should be approved", document.isApproved());
assertTrue("Document should be final", document.isFinal());
GlobalVariables.getMessageMap().clearErrorMessages();
}
示例5: takeAction
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
public static void takeAction(WorkflowDocument document, Document dom, EDLContext edlContext)
throws WorkflowException {
RequestParser requestParser = edlContext.getRequestParser();
UserAction userAction = edlContext.getUserAction();
String annotation = requestParser.getParameterValue("annotation");
String action = userAction.getAction();
String previousNodeName = requestParser.getParameterValue("previousNode");
if (!userAction.isValidatableAction()) {
// if the action's not validatable, clear the attribute definitions because we don't want to end up executing validateClientRoutingData()
// TODO the problem here is that the XML is still updated on a cancel so we end up without any attribute content in the document content
document.clearAttributeDefinitions();
}
boolean actionTaken = true;
if (UserAction.ACTION_ROUTE.equals(action)) {
document.route(annotation);
}else if(UserAction.ACTION_CREATE.equals(action)){
document.saveDocumentData();
}
else if (UserAction.ACTION_APPROVE.equals(action)) {
document.approve(annotation);
} else if (UserAction.ACTION_DISAPPROVE.equals(action)) {
document.disapprove(annotation);
} else if (UserAction.ACTION_CANCEL.equals(action)) {
document.cancel(annotation);
} else if (UserAction.ACTION_BLANKETAPPROVE.equals(action)) {
document.blanketApprove(annotation);
} else if (UserAction.ACTION_FYI.equals(action)) {
document.fyi();
} else if (UserAction.ACTION_ACKNOWLEDGE.equals(action)) {
document.acknowledge(annotation);
} else if (UserAction.ACTION_SAVE.equals(action)) {
if (document.getStatus().equals(DocumentStatus.INITIATED)) {
document.saveDocument(annotation);
} else {
document.saveDocumentData();
}
} else if (UserAction.ACTION_COMPLETE.equals(action)) {
document.complete(annotation);
} else if (UserAction.ACTION_DELETE.equals(action)) {
document.delete();
} else if (UserAction.ACTION_RETURN_TO_PREVIOUS.equals(action)) {
document.returnToPreviousNode(annotation, previousNodeName);
} else {
actionTaken = false;
}
if (actionTaken) {
Element actionTakenElement = EDLXmlUtils.getOrCreateChildElement(dom.getDocumentElement(), ACTION_TAKEN,
true);
actionTakenElement.appendChild(dom.createTextNode(action));
}
}