5 Replies Latest reply on May 13, 2008 9:35 PM by salaboy21

    A question about jBPM process execution.

    youhaodeyi

      This is my code:

       ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(new FileInputStream(
       "jbpm/helloworld/processdefinition.xml"));
      
       ProcessInstance processInstance = new ProcessInstance(processDefinition);
      
       Token token = processInstance.getRootToken();
      
       token.signal();
       System.out.println(token.getNode());
      
       token.signal();
       System.out.println(token.getNode());
      

      This is the processdefinition.xml:
      <process-definition xmlns="" name="helloworld">


      <start-state name="start">

      </start-state>







      <end-state name="end"></end-state>


      </process-definition>

      My question is that why I need invoke signal two times. I assume that I only need to signal the first state and it will transition to the second state and then to the end state. The transition has been specified in the configuration file.