Examples of loadProcessInstance()


Examples of org.jbpm.JbpmContext.loadProcessInstance()

        jbpmContext.close();
        //Our timer fires after 1000 millies, so let's wait for that
        int seconds=0;
        while(true) {
            jbpmContext = jbpmConfiguration.createJbpmContext();
            processInstance = jbpmContext.loadProcessInstance(processInstanceId);
            token = processInstance.getRootToken();
            logger.info(seconds++ + " Node=" + token.getNode().getName());
            if ("ExceptionHandling".equals(token.getNode().getName())) break; //we're done waiting
            if (seconds > 20) break; // the timer must not have fired so we are bailing (and failing)
            jbpmContext.close();
View Full Code Here

Examples of org.jbpm.JbpmContext.loadProcessInstance()

     */
    @Test
    public void takeExceptionTransition() {
        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
        ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId);
       
        Token token = processInstance.getRootToken();
        assertEquals("start",token.getNode().getName());
        //Move the process to service1
        processInstance.signal();
View Full Code Here

Examples of org.jbpm.JbpmContext.loadProcessInstance()

     */
    @Test
    public void takeConditionalTransition() {
        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
        ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId);
       
        Token token = processInstance.getRootToken();
        assertEquals("start",token.getNode().getName());
        //Move the process to service1
        processInstance.signal();
View Full Code Here

Examples of org.jbpm.JbpmContext.loadProcessInstance()

     */
    @Test
    public void doNotTakeConditionalTransition() {
        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
        ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId);
       
        Token token = processInstance.getRootToken();
        assertEquals("start",token.getNode().getName());
        //Move the process to service1
        processInstance.signal();
View Full Code Here

Examples of org.jbpm.JbpmContext.loadProcessInstance()

     */
    @Test
    public void doNotTakeConditionalTransition2() {
        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
        ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId);
       
        Token token = processInstance.getRootToken();
        assertEquals("start",token.getNode().getName());
        //Move the process to service1
        processInstance.signal();
View Full Code Here

Examples of org.jbpm.db.GraphSession.loadProcessInstance()

  }

  private void initialize() {
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    GraphSession graphSession = jbpmContext.getGraphSession();
    ProcessInstance processInstance = graphSession.loadProcessInstance(this.id);
    this.start = processInstance.getStart();
    this.end = processInstance.getEnd();
    this.processDefinitionId = processInstance.getProcessDefinition().getId();
    this.processDefinitionLabel = processInstance.getProcessDefinition().getName() + " (version " + processInstance.getProcessDefinition().getVersion() + ")";
View Full Code Here

Examples of org.jbpm.db.GraphSession.loadProcessInstance()

  public String updateVariable() {

    if (this.variableName != null) {
      JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
      GraphSession graphSession = jbpmContext.getGraphSession();
      ProcessInstance processInstance = graphSession.loadProcessInstance(this.id);
      if (this.variableValue != null) {
        processInstance.getContextInstance().setVariable(this.variableName, this.variableValue);
      } else {
        processInstance.getContextInstance().deleteVariable(this.variableName);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.