/** * instructs the main path of execution to continue by taking the default transition on the * current node. * * @throws IllegalStateException if the token is not active. */ public void signal() { if (hasEnded()) throw new IllegalStateException("process instance has ended"); rootToken.signal(); }
/** * instructs the main path of execution to continue by taking the specified transition on the * current node. * * @throws IllegalStateException if the token is not active. */ public void signal(Transition transition) { if (hasEnded()) throw new IllegalStateException("process instance has ended"); rootToken.signal(transition); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the given * transition. */ public void signal(Transition transition) { signal(transition, new ExecutionContext(this)); }
public boolean execute(JbpmContext jbpmContext) throws Exception { getToken().signal(); return true; }
/** * instructs the main path of execution to continue by taking the specified transition on the * current node. * * @throws IllegalStateException if the token is not active. */ public void signal(Transition transition) { if (hasEnded()) throw new IllegalStateException("process instance has ended"); rootToken.signal(transition); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the given * transition. */ public void signal(Transition transition) { signal(transition, new ExecutionContext(this)); }
/** * instructs the main path of execution to continue by taking the default transition on the * current node. * * @throws IllegalStateException if the token is not active. */ public void signal() { if (hasEnded()) throw new IllegalStateException("process instance has ended"); rootToken.signal(); }
public boolean execute(JbpmContext jbpmContext) throws Exception { getToken().signal(); return true; }
/** * instructs the main path of execution to continue by taking the specified transition on the * current node. * * @throws IllegalStateException if the token is not active. */ public void signal(String transitionName) { if (hasEnded()) throw new IllegalStateException("process instance has ended"); rootToken.signal(transitionName); }
/** * instructs the main path of execution to continue by taking the specified transition on the * current node. * * @throws IllegalStateException if the token is not active. */ public void signal(String transitionName) { if (hasEnded()) throw new IllegalStateException("process instance has ended"); rootToken.signal(transitionName); }
void signal(ExecutionContext executionContext) { signal(node.getDefaultLeavingTransition(), executionContext); }
void signal(ExecutionContext executionContext) { signal(node.getDefaultLeavingTransition(), executionContext); }
@Override public void execute(ExecutionContext executionContext) throws Exception { this.executionContext = executionContext; if (nuxeoHasStarted()) { String endLifecycle = getEndLifecycleTransition(); if (!NuxeoStudioConst.CST_OPERATION_PARAM_NO_TRANSITION.equals(endLifecycle)) { super.execute(executionContext); } else { executionContext.getToken().signal(); } } }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the * transition with the given name. */ public void signal(String transitionName) { if (node == null) { throw new JbpmException(this + " is not positioned in a node"); } Transition leavingTransition = node.getLeavingTransition(transitionName); if (leavingTransition == null) { // fall back to target node name for (Iterator iter = node.getLeavingTransitions().iterator(); iter.hasNext();) { Transition transition = (Transition) iter.next(); if (transitionName.equals(transition.getTo().getName())) { leavingTransition = transition; break; } } if (leavingTransition == null) { throw new JbpmException(node + " has no leaving transition named " + transitionName); } } signal(leavingTransition, new ExecutionContext(this)); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the default * transition. */ public void signal() { if (node == null) { throw new JbpmException(this + " is not positioned in a node"); } Transition defaultTransition = node.getDefaultLeavingTransition(); if (defaultTransition == null) { throw new JbpmException(node + " has no default transition"); } signal(defaultTransition, new ExecutionContext(this)); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the * transition with the given name. */ public void signal(String transitionName) { if (node == null) { throw new JbpmException(this + " is not positioned in a node"); } Transition leavingTransition = node.getLeavingTransition(transitionName); if (leavingTransition == null) { // fall back to target node name for (Iterator iter = node.getLeavingTransitions().iterator(); iter.hasNext();) { Transition transition = (Transition) iter.next(); if (transitionName.equals(transition.getTo().getName())) { leavingTransition = transition; break; } } if (leavingTransition == null) { throw new JbpmException(node + " has no leaving transition named " + transitionName); } } signal(leavingTransition, new ExecutionContext(this)); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the default * transition. */ public void signal() { if (node == null) { throw new JbpmException(this + " is not positioned in a node"); } Transition defaultTransition = node.getDefaultLeavingTransition(); if (defaultTransition == null) { throw new JbpmException(node + " has no default transition"); } signal(defaultTransition, new ExecutionContext(this)); }
public Object execute(JbpmContext jbpmContext) { if (previousProcessInstance != null) { if (variables != null && variables.size() > 0) previousProcessInstance.getContextInstance().addVariables(variables); if (transitionName == null) { previousProcessInstance.signal(); } else { previousProcessInstance.signal(transitionName); } return previousProcessInstance.getRootToken(); } else { Token token = getToken(jbpmContext); if (expectedStateName != null && !expectedStateName.equals(token.getNode().getName())) throw new JbpmException("token is not in expected state '" + expectedStateName + "' but in '" + token.getNode().getName() + "'"); if (variables != null && variables.size() > 0) token.getProcessInstance().getContextInstance().addVariables(variables); if (transitionName == null) { token.signal(); } else { token.signal(transitionName); } return token; } }