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