Package org.jbpm.graph.exe

Examples of org.jbpm.graph.exe.Token.signal()


    assertSame(subProcessDefinition, subProcessInstance.getProcessDefinition());
    Token subToken = subProcessInstance.getRootToken();

    assertSame(subProcessDefinition.getNode("state"), subToken.getNode());

    subToken.signal();

    assertSame(subProcessDefinition.getNode("end"), subToken.getNode());   
    assertTrue(subToken.hasEnded());
    assertTrue(subProcessInstance.hasEnded());
View Full Code Here


          new ProcessInstance(processDefinition);
     
      Token token = processInstance.getRootToken();
      assertEquals("start", token.getNode().getName());
      // Let's start the process execution
      token.signal();
      // Now the process is in the state 's'.
      assertEquals("s", token.getNode().getName());
     
      // Now the processInstance is saved in the database.  So the
      // current state of the execution of the process is stored in the
View Full Code Here

    document = (Document) taskInstance.getVariable("document");
    assertEquals("blablabla", document.getText());
    assertEquals("business process review task", taskInstance.getName());

    // suppose the user presses the approve button
    pageFlowToken.signal("approve");

    // now the page flow process should have moved to the
    // approved page with the approved.jsp
    page = (Page) pageFlowToken.getNode();
    assertNotNull(page);
View Full Code Here

    if (token.getNode().getLeavingTransitions().size() > 1) {
      initializeAvailableTransitions(token);
      return "showTransitions";
    }

    token.signal();

    this.initializeTokensList(token.getProcessInstance());

    return "";
  }
View Full Code Here

      processInstance = taskInstance.getToken().getProcessInstance();
    } else if (this.tokenInstanceId > 0) {
      GraphSession graphSession = jbpmContext.getGraphSession();
      Token token = graphSession.loadToken(this.tokenInstanceId);
      if (transitionName.equals("")) {
        token.signal();
      } else {
        token.signal(transitionName);
      }
      processInstance = token.getProcessInstance();
    }
View Full Code Here

      GraphSession graphSession = jbpmContext.getGraphSession();
      Token token = graphSession.loadToken(this.tokenInstanceId);
      if (transitionName.equals("")) {
        token.signal();
      } else {
        token.signal(transitionName);
      }
      processInstance = token.getProcessInstance();
    }

    jbpmContext.save(processInstance);
View Full Code Here

    log.debug(token.getNode());

    // Let's start the process execution leaving the startstate
    // over its default transition.
    while (!processInstance.hasEnded()) {
      token.signal();
    }
  }
 
}
View Full Code Here

    log.debug(token.getNode());

    // Let's start the process execution leaving the startstate
    // over its default transition.
    while (!processInstance.hasEnded()) {
      token.signal();
    }
  }
 
}
View Full Code Here

     
      if (variables!=null && variables.size()>0)
        token.getProcessInstance().getContextInstance().addVariables(variables);

      if (transitionName==null) {
        token.signal();
      } else {
        token.signal(transitionName);
      }
      return token;
    }
View Full Code Here

        token.getProcessInstance().getContextInstance().addVariables(variables);

      if (transitionName==null) {
        token.signal();
      } else {
        token.signal(transitionName);
      }
      return token;
    }
  }
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.