Skip to content
Permalink
Browse files
BATCHEE-79 trying to link split to next steps
  • Loading branch information
Romain Manni-Bucau committed Dec 2, 2015
1 parent 2936aba commit 276d70903a849e78f4af122a3c179d7ea91cc885
Showing 1 changed file with 7 additions and 1 deletion.
@@ -215,13 +215,19 @@ private void initNodes(final Diagram diagram, final Map<String, Node> nodes,
final String id = element.getId();
allElements.add(element);

addNodeIfMissing(diagram, nodes, id, Node.Type.STEP);
final Node node = addNodeIfMissing(diagram, nodes, id, Node.Type.STEP);

if (Split.class.isInstance(element)) {
final Split split = Split.class.cast(element);
final List<Flow> flows = split.getFlows();
for (final Flow flow : flows) {
initNodes(diagram, nodes, allElements, flow.getExecutionElements());
if (!flow.getExecutionElements().isEmpty()) {
final Node target = nodes.get(flow.getExecutionElements().iterator().next().getId());
if (target != null) {
diagram.addEdge(new Edge("split"), node, target);
}
}
}
} else if (Flow.class.isInstance(element)) {
initNodes(diagram, nodes, allElements, Flow.class.cast(element).getExecutionElements());

0 comments on commit 276d709

Please sign in to comment.