activiti排他网关

 

/*启动流程实例
*可以在启动流程时把所有流程变量设置好
*/
@Test
public void startProcessInstance(){
//流程定义key
String processDefinitionKey = "leave";
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("message",2);
ProcessInstance pi = runtimeService.startProcessInstanceByKey(processDefinitionKey,variables);
System.out.println("流程实例ID:"+pi.getId());
System.out.println("流程实例ID:"+pi.getProcessDefinitionId()); //helloworld:1:4
}

/**执行流程
* 也可以在执行任务时候设置流程变量
*/
@Test
public void complete(){
//Task task = getCurrentTask();
String taskId = "60005";
Map<String,Object> map = new HashMap<String,Object>() ;
map.put("message",2);
taskService.complete(taskId,map);
}

 

相关文章:

  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-05-22
  • 2021-09-02
  • 2021-11-01
  • 2021-06-23
猜你喜欢
  • 2022-12-23
  • 2020-04-07
  • 2021-07-12
  • 2021-08-02
  • 2021-08-31
相关资源
相似解决方案