AnsweredAssumed Answered

Activiti - How to select a path in Exclusive Gateway ?

Question asked by georgots on Mar 26, 2018



So far I successfully ran linear tasks. This time I would like to choose 1 road from 3 paths.  (Look at the attached image). Unfortunately, 4 hours searching for this did not really yield any useful results.


When It comes to linear tasks then I just say task complete & done, it automatically jumps to the next task. What I do not understand is how to start evaluating the condition & how to end it so It would choose the selected path & then it would continue?


My question is

1) How to select path 2

2) How to continue after user selected the path


This is a working  code but I do not understand how to continue:


String userID = "Cate";

String processDefinitionId = "14";

Map<string, object=""> variables = new HashMap<string, object="">();

variables.put("userSelectedPath", 2);

String processInstanceId = aProcsr.startProcess(processDefinitionId, userID, variables);

List processTasks = taskService.createTaskQuery().processInstanceId(processInstanceId).list();

String taskID = processTasks.get(0).getId();