public EndRepresentation getEnd() { if (isLeaf()) { return this.end; } else { return null; } }
private static void processAction(Process process, ActionRepresentation root, int parentId) { int counter = process.getIdCounter(); process.addNode(new ActionNode(counter, root.getMethodName(), root.getLocation(), root .getCode())); process.connection.add(new Connection(parentId, counter)); if (root.isLeaf()) { EndRepresentation end; if (root.hasSharedEnd()) { end = root.getEnd(); } else { end = new EndRepresentation("Default"); } addEnd(process, end, counter); } int children = root.getActions().size() + root.getEvents().size(); String splitName = "ActionSplit"; counter = addSplit(process, counter, children, splitName); handleActions(process, root, counter); handleEvents(process, root, counter); }
private void validateActionRepresentation(ActionRepresentation representation, WorkflowValidationResultImplementation result) { for (ActionRepresentation action : representation.getActions()) { validateActionRepresentation(action, result); } for (EventRepresentation event : representation.getEvents()) { validateEventRepresentation(event, result); } }
private static void handleEvents(Process process, ActionRepresentation root, int counter) { for (EventRepresentation event : root.getEvents()) { processEvent(process, event, counter); } }
private static void iterateOverActions(Process process, ActionRepresentation root, int id) { for (ActionRepresentation action : root.getActions()) { processAction(process, action, id); } }