本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.isAcknowledgeRequested方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.isAcknowledgeRequested方法的具体用法?Java WorkflowDocument.isAcknowledgeRequested怎么用?Java WorkflowDocument.isAcknowledgeRequested使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.isAcknowledgeRequested方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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());
}
}
}
}
示例2: determineValidActions
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
public static List<String> determineValidActions(WorkflowDocument wfdoc) throws WorkflowException {
String[] flags = new String[10];
List<String> list = new ArrayList<String>();
if (wfdoc == null) {
list.add(UserAction.ACTION_CREATE);
return list;
}
if (wfdoc.isAcknowledgeRequested()) {
flags[buttons.ACKNOWLEDGE.ordinal()] = UserAction.ACTION_ACKNOWLEDGE;
}
if (wfdoc.isApprovalRequested()) {
if (wfdoc.isBlanketApproveCapable()) {
flags[buttons.BLANKETAPPROVE.ordinal()] = UserAction.ACTION_BLANKETAPPROVE;
}
if (!wfdoc.isSaved()) {
flags[buttons.APPROVE.ordinal()] = UserAction.ACTION_APPROVE;
flags[buttons.DISAPPROVE.ordinal()] = UserAction.ACTION_DISAPPROVE;
}
// should invoke WorkflowDocument.saveRoutingData(...).
flags[buttons.SAVE.ordinal()] = UserAction.ACTION_SAVE;
if (wfdoc.getPreviousNodeNames().size() > 0) {
flags[buttons.RETURNTOPREVIOUS.ordinal()] = UserAction.ACTION_RETURN_TO_PREVIOUS;
}
}
// this will never happen, but left code in case this gets figured out later
// if allowed to execute save/approve and complete will both show
else if (wfdoc.isCompletionRequested()) {
flags[buttons.COMPLETE.ordinal()] = UserAction.ACTION_COMPLETE;
if (wfdoc.isBlanketApproveCapable()) {
flags[buttons.BLANKETAPPROVE.ordinal()] = UserAction.ACTION_BLANKETAPPROVE;
}
}
if (wfdoc.isFYIRequested()) {
flags[buttons.FYI.ordinal()] = UserAction.ACTION_FYI;
}
if (wfdoc.isRouteCapable()) {
flags[buttons.ROUTE.ordinal()] = UserAction.ACTION_ROUTE;
if (wfdoc.isBlanketApproveCapable()) {
flags[buttons.BLANKETAPPROVE.ordinal()] = UserAction.ACTION_BLANKETAPPROVE;
}
}
if (wfdoc.isApprovalRequested() || wfdoc.isRouteCapable()) {
flags[buttons.SAVE.ordinal()] = UserAction.ACTION_SAVE;
}
if (wfdoc.isCompletionRequested() || wfdoc.isRouteCapable()) {
flags[buttons.CANCEL.ordinal()] = UserAction.ACTION_CANCEL;
}
for (int i = 0; i < flags.length; i++) {
if (flags[i] != null) {
list.add(flags[i]);
}
}
return list;
}