@Override protected void executeOnInactive() throws CoreException { this.log.finest("start fork behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; // select all child nodes final List<Node> childs = this.node.getChildNodes(); this.log.finest("fork activity started => number of childs: " + this.getNode().getChildNodes() .size()); getNode().getExecution().setNextExecutableElements(this, childs); }
public Node createForkPattern(final String name, final List<Node> childNodes, final Scope scope) throws CoreException { Node parentNode = null; if (scope == null) { throw new CoreException("scope cannot be null"); } parentNode = scope.createNode(name, new ForkBehaviourImpl()); // link all children to parent if (childNodes != null) { for (final Node children : childNodes) { scope.linked(parentNode, children); } } return parentNode; } }
@Override protected void executeOnStarted() throws CoreException { if (this.getNode().getExecution().getChildExecutions().isEmpty()) { this.log.finest("fork activity started => number of child executions: " + this.getNode().getExecution().getChildExecutions() .size()); this.log .finest("end fork behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; } } }
@Override protected void executeOnInactive() throws CoreException { this.log.finest("start fork behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; // select all child nodes final List<Node> childs = this.node.getChildNodes(); this.log.finest("fork activity started => number of childs: " + this.getNode().getChildNodes() .size()); getNode().getExecution().setNextExecutableElements(this, childs); }
@Override protected void executeOnStarted() throws CoreException { if (this.getNode().getExecution().getChildExecutions().isEmpty()) { this.log.finest("fork activity started => number of child executions: " + this.getNode().getExecution().getChildExecutions() .size()); this.log .finest("end fork behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; } } }