diff --git a/process-analyzer-test/processes/FlowParallelInOrder.p.json b/process-analyzer-test/processes/FlowParallelInOrder.p.json index 0d893019..f0ec08a0 100644 --- a/process-analyzer-test/processes/FlowParallelInOrder.p.json +++ b/process-analyzer-test/processes/FlowParallelInOrder.p.json @@ -750,6 +750,168 @@ "connect" : [ { "id" : "f97", "to" : "f33", "var" : "in2" } ] + }, { + "id" : "f34", + "type" : "RequestStart", + "name" : "start5", + "config" : { + "signature" : "start5" + }, + "visual" : { + "at" : { "x" : 136, "y" : 1328 } + }, + "connect" : [ + { "id" : "f93", "to" : "f91", "var" : "in1" } + ] + }, { + "id" : "f91", + "type" : "TaskSwitchGateway", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "responsible" : { + "activator" : "SYSTEM" + } + }, { + "id" : "TaskB", + "responsible" : { + "activator" : "SYSTEM" + } + } ] + }, + "visual" : { + "at" : { "x" : 240, "y" : 1328 } + }, + "connect" : [ + { "id" : "f98", "to" : "f100", "via" : [ { "x" : 240, "y" : 1272 } ], "condition" : "ivp==\"TaskA.ivp\"" }, + { "id" : "f101", "to" : "f94", "via" : [ { "x" : 240, "y" : 1424 } ], "condition" : "ivp==\"TaskB.ivp\"" } + ] + }, { + "id" : "f94", + "type" : "UserTask", + "name" : "TaskB4", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.test.Dummy:start()", + "task" : { + "name" : "TaskB4" + } + }, + "visual" : { + "at" : { "x" : 344, "y" : 1424 } + }, + "connect" : [ + { "id" : "f111", "to" : "f108", "via" : [ { "x" : 696, "y" : 1424 } ], "var" : "in3" } + ] + }, { + "id" : "f100", + "type" : "UserTask", + "name" : "TaskA4", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.test.Dummy:start()", + "task" : { + "name" : "TaskA4" + } + }, + "visual" : { + "at" : { "x" : 352, "y" : 1272 } + }, + "connect" : [ + { "id" : "f103", "to" : "f102", "var" : "in1" } + ] + }, { + "id" : "f102", + "type" : "TaskSwitchGateway", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "responsible" : { + "activator" : "SYSTEM" + } + }, { + "id" : "TaskB", + "responsible" : { + "activator" : "SYSTEM" + } + } ] + }, + "visual" : { + "at" : { "x" : 464, "y" : 1272 } + }, + "connect" : [ + { "id" : "f105", "to" : "f106", "via" : [ { "x" : 464, "y" : 1224 } ], "condition" : "ivp==\"TaskA.ivp\"" }, + { "id" : "f107", "to" : "f104", "via" : [ { "x" : 464, "y" : 1312 } ], "condition" : "ivp==\"TaskB.ivp\"" } + ] + }, { + "id" : "f104", + "type" : "UserTask", + "name" : "TaskD4", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.test.Dummy:start()", + "task" : { + "name" : "TaskD4" + } + }, + "visual" : { + "at" : { "x" : 576, "y" : 1312 } + }, + "connect" : [ + { "id" : "f110", "to" : "f108", "via" : [ { "x" : 672, "y" : 1312 } ], "var" : "in2" } + ] + }, { + "id" : "f106", + "type" : "UserTask", + "name" : "TaskC4", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.test.Dummy:start()", + "task" : { + "name" : "TaskC4" + } + }, + "visual" : { + "at" : { "x" : 576, "y" : 1224 } + }, + "connect" : [ + { "id" : "f109", "to" : "f108", "via" : [ { "x" : 696, "y" : 1224 } ], "var" : "in1" } + ] + }, { + "id" : "f108", + "type" : "TaskSwitchGateway", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "responsible" : { + "activator" : "SYSTEM" + } + } ] + }, + "visual" : { + "at" : { "x" : 696, "y" : 1376 } + }, + "connect" : [ + { "id" : "f113", "to" : "f112", "condition" : "ivp==\"TaskA.ivp\"" } + ] + }, { + "id" : "f112", + "type" : "UserTask", + "name" : "TaskE4", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.test.Dummy:start()", + "task" : { + "name" : "TaskE4" + } + }, + "visual" : { + "at" : { "x" : 800, "y" : 1376 } + }, + "connect" : [ + { "id" : "f115", "to" : "f114" } + ] + }, { + "id" : "f114", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 920, "y" : 1376 } + } } ], "layout" : { "colors" : { diff --git a/process-analyzer-test/src_test/com/axonivy/utils/process/analyzer/test/FlowParallelInOrderTest.java b/process-analyzer-test/src_test/com/axonivy/utils/process/analyzer/test/FlowParallelInOrderTest.java index 0caef7d1..c041fcf7 100644 --- a/process-analyzer-test/src_test/com/axonivy/utils/process/analyzer/test/FlowParallelInOrderTest.java +++ b/process-analyzer-test/src_test/com/axonivy/utils/process/analyzer/test/FlowParallelInOrderTest.java @@ -174,4 +174,15 @@ void shouldFindTasksOnPathAtTaskG2AndTaskI2() throws Exception { var taskNames = getTaskNames(detectedTasks); assertArrayEquals(expected, taskNames); } + + @Test + void shouldFindAllTasksAtStart5() throws Exception { + var start5 = ProcessGraphHelper.findByElementName(process, "start5"); + + var detectedTasks = processAnalyzer.findAllTasks(start5, null); + var expected = Arrays.array("TaskA4", "TaskC4", "TaskD4", "TaskB4", "TaskE4"); + + var taskNames = getTaskNames(detectedTasks); + assertArrayEquals(expected, taskNames); + } } \ No newline at end of file