Skip to content

Commit

Permalink
TE-585: Handle more case of parallel task
Browse files Browse the repository at this point in the history
  • Loading branch information
trungmaihova committed May 23, 2024
1 parent db5b4ac commit 8733648
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 0 deletions.
162 changes: 162 additions & 0 deletions process-analyzer-test/processes/FlowParallelInOrder.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 8733648

Please sign in to comment.