/**完成我的任务*/
@Test
public void completeMyPersonalTask(){
//任务ID
String taskId = "1104";
Map<String, Object> taskVariables = new HashMap<String, Object>();
taskVariables.put("flag", "true");
processEngine.getTaskService()//与正在执行的任务管理相关的Service
.complete(taskId,taskVariables);
System.out.println("完成任务:任务ID:"+taskId);
}
bpmn.xml中,连线要加上如下代码:
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${flag=='false'}]]></conditionExpression>