Package org.jbpm.graph.exe

Examples of org.jbpm.graph.exe.ExecutionContext


        Element element = document.getRootElement();
        Element secondMiddleState = (Element) element.elements("state").toArray()[1];
        DefaultElement bpmToEsbVars = (DefaultElement) secondMiddleState.element("transition").element("action").element("bpmToEsbVars");

        Token token = processInstance.getRootToken();
        ExecutionContext executionContext = new ExecutionContext(token);
        Node node = executionContext.getNode();
        Transition transition = (Transition) node.getLeavingTransitions().get(0);

        JBpmObjectMapper mapper = new JBpmObjectMapper();
        Message message = mapper.mapFromJBpmToEsbMessage(bpmToEsbVars, Boolean.FALSE, executionContext);
View Full Code Here


        Token token = processInstance.getRootToken();
        processInstance.getContextInstance().createVariable("v1", helloWorldTokenScope, token);
        processInstance.getContextInstance().createVariable("g2", helloWorldGlobalScope);
        processInstance.getContextInstance().createVariable("h3", objectTokenScope, token);
        processInstance.getContextInstance().createVariable("i4", objectGlobalScope);
        ExecutionContext executionContext = new ExecutionContext(token);
       
        JBpmObjectMapper mapper = new JBpmObjectMapper();
        Message message = mapper.mapFromJBpmToEsbMessage(bpmToEsbVars, Boolean.FALSE, executionContext);
       
        //Setting up return mapping for the callback service.
View Full Code Here

    iter = forkedTokens.iterator();
    while( iter.hasNext() ) {
      ForkedToken forkedToken = (ForkedToken) iter.next();
      Token childToken = forkedToken.token;
      String leavingTransitionName = forkedToken.leavingTransitionName;
      ExecutionContext childExecutionContext = new ExecutionContext(childToken);
      if (leavingTransitionName!=null) {
        leave(childExecutionContext, leavingTransitionName);
      } else {
        leave(childExecutionContext);
      }
View Full Code Here

  }

  public boolean execute(JbpmContext jbpmContext) throws Exception {
    boolean deleteThisJob = true;

    ExecutionContext executionContext = new ExecutionContext(token);
    executionContext.setTimer(this);

    if (taskInstance!=null) {
      executionContext.setTaskInstance(taskInstance);
    }

    // first fire the event if there is a graph element specified
    if (graphElement!=null) {
      graphElement.fireAndPropagateEvent(Event.EVENTTYPE_TIMER, executionContext);
View Full Code Here

    super(token);
  }
 
  public boolean execute(JbpmContext jbpmContext) throws Exception {
    log.debug("job["+id+"] executes "+action);
    ExecutionContext executionContext = new ExecutionContext(token);
    executionContext.setAction(action);
    executionContext.setEvent(action.getEvent());
    action.execute(executionContext);
    return true;
  }
View Full Code Here

  }
 
  public boolean execute(JbpmContext jbpmContext) throws Exception {
    log.debug("job["+id+"] executes "+node);
    token.unlock(this.toString());
    ExecutionContext executionContext = new ExecutionContext(token);
    node.execute(executionContext);
    return true;
  }
View Full Code Here

   
    // fire the event
    if ( (task!=null)
         && (token!=null)
       ) {
      ExecutionContext executionContext = new ExecutionContext(token);
      executionContext.setTask(task);
      executionContext.setTaskInstance(this);
      task.fireEvent(Event.EVENTTYPE_TASK_ASSIGN, executionContext);
    }
   
    // add the log
    if (token!=null) {
View Full Code Here

   
    start = new Date();
    if ( (task!=null)
         && (token!=null)
       ) {
      ExecutionContext executionContext = new ExecutionContext(token);
      executionContext.setTask(task);
      executionContext.setTaskInstance(this);
      task.fireEvent(Event.EVENTTYPE_TASK_START, executionContext);
    }
  }
View Full Code Here

    // fire the task instance end event
    if ( (task!=null)
         && (token!=null)
       ) {
      ExecutionContext executionContext = new ExecutionContext(token);
      executionContext.setTask(task);
      executionContext.setTaskInstance(this);
      task.fireEvent(Event.EVENTTYPE_TASK_END, executionContext);
    }
   
    // log this assignment
    if (token!=null) {
View Full Code Here

    Map outputMap = eval(executionContext);
    setVariables(outputMap, executionContext);
  }

  public Map eval(Token token) throws Exception {
    return eval(new ExecutionContext(token));
  }
View Full Code Here

TOP

Related Classes of org.jbpm.graph.exe.ExecutionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.