@Override void process() throws Exception { initProcessAndTask(context); action.execute(context); } }.run();
public void executeAction(final Action action, final ExecutionContext context) throws Exception { if ( isPageflow(context) ) { action.execute(context); } else { new ContextualCall() { @Override void process() throws Exception { initProcessAndTask(context); action.execute(context); } }.run(); } }
public void execute(ExecutionContext executionContext) throws Exception { Thread currentThread = Thread.currentThread(); ClassLoader contextClassLoader = currentThread.getContextClassLoader(); try { // set context class loader correctly for delegation class // (https://jira.jboss.org/jira/browse/JBPM-1448) ClassLoader processClassLoader = JbpmConfiguration.getProcessClassLoader(executionContext.getProcessDefinition()); currentThread.setContextClassLoader(processClassLoader); if (referencedAction != null) { referencedAction.execute(executionContext); } else if (actionExpression != null) { JbpmExpressionEvaluator.evaluate(actionExpression, executionContext); } else if (actionDelegation != null) { ActionHandler actionHandler = (ActionHandler) actionDelegation.getInstance(); actionHandler.execute(executionContext); } } finally { currentThread.setContextClassLoader(contextClassLoader); } }
public void execute(ExecutionContext executionContext) throws Exception { Thread currentThread = Thread.currentThread(); ClassLoader contextClassLoader = currentThread.getContextClassLoader(); try { // set context class loader correctly for delegation class // (https://jira.jboss.org/jira/browse/JBPM-1448) ClassLoader processClassLoader = JbpmConfiguration.getProcessClassLoader(executionContext.getProcessDefinition()); currentThread.setContextClassLoader(processClassLoader); if (referencedAction != null) { referencedAction.execute(executionContext); } else if (actionExpression != null) { JbpmExpressionEvaluator.evaluate(actionExpression, executionContext); } else if (actionDelegation != null) { ActionHandler actionHandler = (ActionHandler) actionDelegation.getInstance(); actionHandler.execute(executionContext); } } finally { currentThread.setContextClassLoader(contextClassLoader); } }
/** * Process events defined in the pageflow. * * @param type one of: "process-validations", "update-model-values", * "invoke-application", "render-response" */ public void processEvents(String type) { Event event = getNode().getEvent(type); if (event!=null) { for ( Action action: (List<Action>) event.getActions() ) { try { action.execute( ExecutionContext.currentExecutionContext() ); } catch (Exception e) { throw new RuntimeException(e); } } } }
private void executeActionImpl(Action action, ExecutionContext executionContext) throws Exception { // set context action executionContext.setAction(action); try { UserCodeInterceptor userCodeInterceptor = UserCodeInterceptorConfig.getUserCodeInterceptor(); if (userCodeInterceptor != null) { userCodeInterceptor.executeAction(action, executionContext); } else { action.execute(executionContext); } } finally { // reset context action executionContext.setAction(null); } }
private void executeActionImpl(Action action, ExecutionContext executionContext) throws Exception { // set context action executionContext.setAction(action); try { UserCodeInterceptor userCodeInterceptor = UserCodeInterceptorConfig.getUserCodeInterceptor(); if (userCodeInterceptor != null) { userCodeInterceptor.executeAction(action, executionContext); } else { action.execute(executionContext); } } finally { // reset context action executionContext.setAction(null); } }
public boolean execute(JbpmContext jbpmContext) throws Exception { Token token = getToken(); ExecutionContext executionContext = new ExecutionContext(token); executionContext.setAction(action); executionContext.setEvent(action.getEvent()); Node node; if (token != null && (node = token.getNode()) != null) { node.executeAction(action, executionContext); } else { action.execute(executionContext); } return true; }
public boolean execute(JbpmContext jbpmContext) throws Exception { Token token = getToken(); ExecutionContext executionContext = new ExecutionContext(token); executionContext.setAction(action); executionContext.setEvent(action.getEvent()); Node node; if (token != null && (node = token.getNode()) != null) { node.executeAction(action, executionContext); } else { action.execute(executionContext); } return true; }
action.execute(executionContext);
action.execute(executionContext);
getAction().execute(executionContext);