[BUG] Parallel Gateway with Multi-Instance Task Generates Duplicate Tasks When Moving Executions to External Activity
-
Description Parallel Gateway with Multi-Instance Task Generates Duplicate Tasks When Moving Executions to External Activity. Flowable v6.8.0 is ok.
-
Version Flowable Version: 7.1.0
-
Unit Test
@Test
@Deployment(resources = { "org/flowable/engine/test/api/test.bpmn20.xml" })
public void test() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("test");
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertThat(task.getTaskDefinitionKey()).isEqualTo("Starter");
// Complete task Starter
taskService.complete(task.getId());
// Current Tasks
List<String> currentActivities = new ArrayList<>();
currentActivities.add("TaskA");
currentActivities.add("TaskB");
changeStateEventListener.clear();
runtimeService.createChangeActivityStateBuilder()
.processInstanceId(processInstance.getId())
.moveActivityIdsToSingleActivityId(currentActivities, "Starter")
.changeState();
List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
assertThat(tasks).hasSize(1);
}
@tijsrademakers Please take a look
@filiphr Please take a look
I have also encountered this problem. May I ask if there is a solution?
@tijsrademakers @filiphr Please take a look
@tijsrademakers @filiphr Please take a look
Hi, this is not yet supported in the change activity state builder.
7.2.0 work?
Delete child nodes before moving the node