public com.ebmwebsourcing.easyviper.core.api.engine.Execution getExecution() { com.ebmwebsourcing.easyviper.core.api.engine.Execution ret = service.getExecution(); return ret; }
public com.ebmwebsourcing.easyviper.core.api.engine.Execution getExecution() { if ( impl == null ) { throw new java.lang.NullPointerException("Trying to invoke a method on a client or server interface whose complementary interface is not bound."); } com.ebmwebsourcing.easyviper.core.api.engine.Execution ret = impl.getExecution(); return ret; }
@Override protected void executeOnStarted() throws CoreException { if(getNode().getExecution().getChildExecutions().isEmpty()) { //when the fastest child execution finished log.finest("End of exclusive behaviour."); this.state = State.ACTIVITY_ENDED; } }
@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 echo behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; this.log.finest("execute echo behaviour: " + this.message); if(this.message != null) { System.out.println(this.message.evaluate(this.node.getExecution().getParentScope())); } }
@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 exit behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; this.getNode().getExecution().setStateRecursively(Execution.State.CANCELLED); this.state = State.ACTIVITY_ENDED; }
@Override protected void executeOnInactive() throws CoreException { this.log.finest("start exit behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; this.getNode().getExecution().setStateRecursively(Execution.State.CANCELLED); this.state = State.ACTIVITY_ENDED; }
private void whileExecution() throws CoreException { Boolean cond = (Boolean) this.condition.evaluate(this.getNode().getExecution() .getParentScope()); if (cond != null && cond == true) { final List<Node> childs = this.node.getChildNodes(); if ((childs != null) && (childs.size() > 0)) { getNode().getExecution().setNextExecutableElements(this, childs.get(0)); } } else { this.log.finest("end while behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; } }
private void whileExecution() throws CoreException { Boolean cond = (Boolean) this.condition.evaluate(this.getNode().getExecution() .getParentScope()); if (cond != null && cond == true) { final List<Node> childs = this.node.getChildNodes(); if ((childs != null) && (childs.size() > 0)) { getNode().getExecution().setNextExecutableElements(this, childs.get(0)); } } else { this.log.finest("end while 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); }
private void repeatUntilExecution(boolean first) throws CoreException { boolean ok = true; if(!first) { Boolean cond = (Boolean) this.condition.evaluate(this.getNode().getExecution().getParentScope()); if (cond == null || cond == false) { this.log.finest("end repeat until behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_ENDED; ok = false; } } if(ok) { final List<Node> childs = this.node.getChildNodes(); if ((childs != null) && (childs.size() > 0)) { getNode().getExecution().setNextExecutableElements(this, childs.get(0)); } } }
@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 public synchronized void onChildBehaviourNotification(Behaviour childBehaviour) throws CoreException { if(alreadyNotified) { return; } alreadyNotified = true; log.finest("Notification received from "+childBehaviour.getName()); //cancel all the other child executions String execName = childBehaviour.getNode().getExecution().getName(); for(Execution childExec : getNode().getExecution().getChildExecutions()) { if(!execName.equals(childExec.getName())) { log.finest(childExec.getName()+" has been cancelled"); childExec.setState(Execution.State.CANCELLED); getNode().getExecution().removeChildExecution(childExec); } } }
public InternalMessage<?> sendSyncTo(final InternalMessage<?> request, final Endpoint endpoint, final ExternalContext context) throws CoreException { final com.ebmwebsourcing.easyviper.core.api.engine.Process p = this .getNode().getExecution().getParentScope().getProcess(); return p.getEngine().sendSyncTo(request, endpoint, context); }
public void sendTo(final InternalMessage<?> message, final Endpoint endpoint, final ExternalContext context) throws CoreException { final com.ebmwebsourcing.easyviper.core.api.engine.Process p = this .getNode().getExecution().getParentScope().getProcess(); p.getEngine().sendTo(message, endpoint, context); }
@Override public InternalMessage<?> sendSyncTo(final InternalMessage<?> request, final Endpoint endpoint, final Map<Endpoint, Map<String, ExternalContext>> context) throws CoreException { final com.ebmwebsourcing.easyviper.core.api.engine.Process p = this .getNode().getExecution().getParentScope().getProcess(); return p.getEngine().sendSyncTo(request, endpoint, context); }
public void sendTo(final InternalMessage<?> message, final Endpoint endpoint, final Map<Endpoint, Map<String, ExternalContext>> context) throws CoreException { final com.ebmwebsourcing.easyviper.core.api.engine.Process p = this .getNode().getExecution().getParentScope().getProcess(); p.getEngine().sendTo(message, endpoint, context); }
@Override public void onTimerFinish(TimerFinishedEvent e) throws CoreException { if(e.getException()!=null) { throw new CoreException(e.getException()); } else{ e.getWaitBehaviour().terminateWaiting(); restartExecutionAndParents(e.getWaitBehaviour().getNode().getExecution(), null); } }
@Override protected void executeOnInactive() throws CoreException { String msg = this.getMessage().evaluate(this.node.getExecution().getParentScope()); if(this.level == null){ severe("Level is null !" + msg); }else if(this.level.equals(LoggerBehaviour.LEVEL.SEVERE)){ severe(msg); }else if(this.level.equals(LoggerBehaviour.LEVEL.WARNING)){ warning(msg); }else if(this.level.equals(LoggerBehaviour.LEVEL.INFO)){ info(msg); }else if(this.level.equals(LoggerBehaviour.LEVEL.DEBUG)){ debug(msg); } }