审批流程图:
主要实现在"窗台收件"任务完成时,必须指定下一步"经办人意见"的任务参与者
完成"窗台收件"任务时加入以下代码:
//指定"经办人意见"的参与者 Map<String,Object> clerkMap = new HashMap<String, Object>(); clerkMap.put("clerk", this.clerk); this.taskService.setVariables(task.getId(), clerkMap);
jbdl文件中,“经办人意见”节点的assignment-handler
<task g="375,121,92,52" name="经办人意见" > <assignment-handler class="com.shhjx.poc.process.assign.ClerkOpinionAssignHandler" /> <transition g="-77,-16" name="to所长审核" to="所长审核"/> </task>
package com.shhjx.poc.process.assign; import org.jbpm.api.model.OpenExecution; import org.jbpm.api.task.Assignable; import org.jbpm.api.task.AssignmentHandler; public class ClerkOpinionAssignHandler implements AssignmentHandler{ @Override public void assign(Assignable assignable, OpenExecution execution) throws Exception { assignable.setAssignee(execution.getVariable("clerk").toString()); } }
长沙废品回收www.0731fphs.com