@Override protected void executeOnInactive() throws CoreException { this.log.finest("start assign behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; this.affect(); this.log.finest("end of assign behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; }
private Node generateAssign(final Scope scope, final Assign assign, final BPELProcess bpelprocess) throws CoreException { this.log.finest("start generate assign"); Node assignNode = null; if (assign != null) { // create assign node final AssignBehaviour assignBehaviour = new AssignBehaviourImpl(); for (final Copy copy : assign.getCopy()) { final BPELAssignementExpression assignExp = new BPELAssignementExpressionImpl( copy, bpelprocess); if (!this.log.getName() .equals(BPELCompilerImpl.class.getName())) { assignExp.setLog(this.log); } assignBehaviour.addAssignementExpression(assignExp); } assignNode = scope.createNode(assign.getName(), assignBehaviour); } this.log.finest("end generate assign"); return assignNode; }
public void affect() throws CoreException { if (this.assignements != null) { for (final AssignementExpression assignement : this.assignements) { if ((assignement == null) || (assignement.getLeft() == null)) { throw new CoreException("The left assignement is null"); } Assigner assigner = getNode().getExecution().getParentScope().getProcess().getAssigner(); if (assigner == null) { throw new CoreException( "Error: the assigner cannot be null"); } // realized affectation this.log.finest("set " + assignement.getRight() + " in " + assignement.getLeft()); assigner.affect( this.getNode().getExecution().getParentScope(), assignement.getLeft(), assignement.getRight()); } } }
public void affect() throws CoreException { if (this.assignements != null) { for (final AssignementExpression assignement : this.assignements) { if ((assignement == null) || (assignement.getLeft() == null)) { throw new CoreException("The left assignement is null"); } Assigner assigner = getNode().getExecution().getParentScope().getProcess().getAssigner(); if (assigner == null) { throw new CoreException( "Error: the assigner cannot be null"); } // realized affectation this.log.finest("set " + assignement.getRight() + " in " + assignement.getLeft()); assigner.affect( this.getNode().getExecution().getParentScope(), assignement.getLeft(), assignement.getRight()); } } }
@Override protected void executeOnInactive() throws CoreException { this.log.finest("start assign behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; this.affect(); this.log.finest("end of assign behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; }