public void retrigger(boolean remove) { if (remove) { cancel(); } triggerNode(getNodeId(), remove == false); }
/** * This method is used in both instances of the {@link ExtendedNodeInstanceImpl} * and {@link ActionNodeInstance} instances in order to handle * exceptions thrown when executing actions. * * @param action An {@link Action} instance. */ protected void executeAction(Action action) { ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime()); context.setNodeInstance(this); try { action.execute(context); } catch (Exception e) { String exceptionName = e.getClass().getName(); ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance) resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName); if (exceptionScopeInstance == null) { throw new WorkflowRuntimeException(this, getProcessInstance(), "Unable to execute Action: " + e.getMessage(), e); } exceptionScopeInstance.handleException(exceptionName, e); cancel(); } }
public void retrigger(boolean remove) { if (remove) { cancel(); } triggerNode(getNodeId(), remove == false); }
/** * This method is used in both instances of the {@link ExtendedNodeInstanceImpl} * and {@link ActionNodeInstance} instances in order to handle * exceptions thrown when executing actions. * * @param action An {@link Action} instance. */ protected void executeAction(Action action) { ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime()); context.setNodeInstance(this); try { action.execute(context); } catch (Exception e) { String exceptionName = e.getClass().getName(); ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance) resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName); if (exceptionScopeInstance == null) { throw new WorkflowRuntimeException(this, getProcessInstance(), "Unable to execute Action: " + e.getMessage(), e); } exceptionScopeInstance.handleException(exceptionName, e); cancel(); } }