本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.isApprovalRequested方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.isApprovalRequested方法的具体用法?Java WorkflowDocument.isApprovalRequested怎么用?Java WorkflowDocument.isApprovalRequested使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.isApprovalRequested方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}