如何将工作流审批信息写入单据字段。

1 业务背景
很多客户都有需求把流程中的一些信息记录在单据字段上。
2 实现方案
工作流提供很多时机可以写插件,只需要继承工作流的接口IWorkflowPlugin,在封装好的参数对象里就能获取到流程中信息,从而写入到单据的字段上。步骤如下:
步骤一:
二开插件继承IWorkflowPlugin,实现notify方法代码如下
@Override
public void notify(AgentExecution execution) {
//单据的BusinessKey(业务ID)
String BusinessKey = execution.getBusinessKey();
//单据实体编码
String entityNumber = execution.getEntityNumber();
//获取当前节点的审批人
List<Long> currentApprover = execution.getCurrentApprover();
//获取流程发起人
Long startUserId = execution.getStartUserId();
//获取当前节点
WorkflowElement<?> flowElement = execution.getCurrentFlowElement();
//当前流程节点ID
String id = flowElement.getId();
//当前节点名称
String nodeName = flowElement.getName();
//当前节点id
String number = flowElement.getNumber();
//获取当前任务
AgentTask task = execution.getCurrentTask();
//当前任务ID
Long taskId = execution.getCurrentTaskId();
//获取当前 任务执行结果
Object currentTaskResult = execution.getCurrentTaskResult(WFTaskResultEnum.auditName);
Ob如何将工作流审批信息写入单据字段。
1 业务背景很多客户都有需求把流程中的一些信息记录在单据字段上。2 实现方案工作流提供很多时机可以写插件,只需要继承工作流的接口IWor...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



