@Override public void terminateWaiting() throws CoreException { alreadyWaited = true; notifyParentBehaviour(); }
Long time = this.time.evaluate(this.getNode().getExecution().getParentScope()); if(time == null) { throw new CoreException("Impossible to evaluate long expression: " + this.time.getContent()); Date date = this.date.evaluate(this.getNode().getExecution().getParentScope()); if(date == null) { throw new CoreException("Impossible to evaluate date expression: " + this.date.getContent());
private Node generateWait(final Scope scope, final Wait wait, final BPELProcess bpelprocess) throws CoreException { this.log.finest("start generate wait"); final WaitBehaviour waitBehaviour = new WaitBehaviourImpl(); if (wait.getUntil() != null) { waitBehaviour.setDate((DateExpression<?>) wait.getUntil() .copypaste()); } if (wait.getFor() != null) { waitBehaviour.setDuration((LongExpression<?>) wait.getFor() .copypaste()); } final Node waitNode = scope.createNode(wait.getName(), waitBehaviour); return waitNode; }
this.state = State.ACTIVITY_STARTED; Process process = getNode().getExecution().getParentScope().getProcess(); Long time = this.time.evaluate(this.getNode().getExecution().getParentScope()); if(time == null) { throw new CoreException("Impossible to evaluate long expression: " + this.time.getContent()); this.log.finest("execute wait behaviour on node: " + this.node.getName() + " => wait during " + time + " ms"); getNode().getExecution().setStateRecursively(Execution.State.SUSPENDED); WaitingThreadPool.addWaitingThread(process, this, time); Date date = this.date.evaluate(this.getNode().getExecution().getParentScope()); if(date == null) { throw new CoreException("Impossible to evaluate date expression: " + this.date.getContent()); this.log.finest("execute wait behaviour on node: " + this.node.getName() + " => wait during " + time + " ms"); getNode().getExecution().setStateRecursively(Execution.State.SUSPENDED); WaitingThreadPool.addWaitingThread(process, this, time);