当前位置: 首页>>代码示例>>Java>>正文


Java WorkflowDocument.delete方法代码示例

本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.delete方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.delete方法的具体用法?Java WorkflowDocument.delete怎么用?Java WorkflowDocument.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kew.api.WorkflowDocument的用法示例。


在下文中一共展示了WorkflowDocument.delete方法的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));
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:56,代码来源:WorkflowDocumentActions.java


注:本文中的org.kuali.rice.kew.api.WorkflowDocument.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。