@Override protected void executeOnStarted() throws CoreException { if (isSuspended) { executeOnSuspended(); } else { // TODO : check we should never enter here... probably dead code. this.log .finest("end receive behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; this.log.finest("received activity ended"); this.setMessage(null); this.childNodeSelected = null; } }
public void addVariableName(final QName variableName) { this.getVariableNames().add(variableName); }
final boolean accept = this.accept(this.message, this.getNode().getExecution() .getParentScope().getProcess().getExternalContext()); if (accept) { this.log.finest("Message accepted by the receive activity: " + this.getName()); if (this.getChildNodeSelected() != null) { getNode().getExecution().setNextExecutableElements(this, getChildNodeSelected()); } else { this.state = State.ACTIVITY_ENDED; this.getNode().getExecution().setStateRecursively( Execution.State.SUSPENDED); isSuspended = true; this.log .finest("Message does not correspond - execution suspended: " + this.getNode().getExecution().getState()); this.getNode().getExecution().setStateRecursively(Execution.State.SUSPENDED); isSuspended = true; this.log.finest("No Message - execution suspended: " + this.getNode().getExecution().getState());
for (final QName variableName : this.getVariableNames()) { final Variable v = scope.findVariable(variableName); if (v == null) { throw new CoreException( "Impossible to find in process, the variable used in the received : " + this.getName()); if (this.getMessageMatcher() != null) { check = this.getMessageMatcher().match(v, message); } else { this.log.warning("no matcher found"); log.finest("Correlation found: execute correlation for receiver: " + this.getName()); for(CorrelationMatcher corr: this.correlationsMatcher) { correlationOK = corr.match(scope, variableName, message);
final ReceiverBehaviour receiver = new ReceiverBehaviourImpl(); receiver.addVariableName(new QName(receive.getInputVariable())); this.log.finest("create receiver behaviour");
@Override protected void executeOnInactive() throws CoreException { executeOnSuspended(); }
throw new CoreException( "Impossible to find in process, the variable used in the received : " + this.getName()); log.finest("Correlation found: execute correlation for receiver: " + this.getName()); for(CorrelationMatcher corr: this.correlationsMatcher) { correlationOK = corr.match(scope, variableName, message);
Endpoint endpoint = this.getNode().getExecution().getParentScope().findEndpoint(this.providerEndpointKey); ExternalContext context = this.getNode().getExecution().getParentScope().getProcess().getExternalContext(endpoint, this.message.getOperationName()); final boolean accept = this.accept(this.message, context); if (accept) { this.log.finest("Message accepted by the receive activity: " + this.getName()); if (this.getChildNodeSelected() != null) { getNode().getExecution().setNextExecutableElements(this, getChildNodeSelected()); notifyParentBehaviour(); } else { this.getNode().getExecution().setStateRecursively( Execution.State.SUSPENDED); isSuspended = true; this.log .finest("Message does not correspond - execution suspended: " + this.getNode().getExecution().getState()); this.getNode().getExecution().setStateRecursively(Execution.State.SUSPENDED); isSuspended = true; this.log.finest("No Message - execution suspended: " + this.getNode().getExecution().getState());
final ReceiverBehaviour receiver = new ReceiverBehaviourImpl(); receiver.addVariableName(new QName(msg.getInputVariable()));
@Override protected void executeOnInactive() throws CoreException { executeOnSuspended(); }
@Override protected void executeOnStarted() throws CoreException { if (isSuspended) { executeOnSuspended(); } else { // TODO : check we should never enter here... probably dead code. this.log .finest("end receive behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; this.log.finest("received activity ended"); this.setMessage(null); this.childNodeSelected = null; } }
final ReceiverBehaviour severalReceiversBehaviour = new ReceiverBehaviourImpl(); severalReceiversBehaviour.getVariableNames().addAll(variableNames);