public void testAprioriRuntimeKnowledgeScenario2() {
    scenario = 2;

    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    Token token = processInstance.getRootToken();
    processInstance.signal();
    processInstance.signal();
    assertSame(t, token.getNode());

    endOneTask(token);
    assertSame(c, token.getNode());
  }
コード例 #2
0
 /**
  * is the list of transitions that can be used in the end method and it is null in case this is
  * not the last task instance.
  */
 public List getAvailableTransitions() {
   List transitions = null;
   if ((!isLast()) && (token != null)) {
     transitions = new ArrayList(token.getNode().getLeavingTransitions());
   }
   return transitions;
 }
コード例 #3
0
 public void testMilestoneScenario2() {
   ProcessDefinition pd = milestoneProcessDefinition;
   Token root = startScenario();
   Token tokenM = root.getChild("m");
   Token tokenD = root.getChild("d");
   assertSame(pd.getNode("b"), tokenM.getNode());
   assertSame(pd.getNode("d"), tokenD.getNode());
   tokenD.signal();
   assertSame(pd.getNode("b"), tokenM.getNode());
   assertSame(pd.getNode("join"), tokenD.getNode());
   tokenM.signal();
   assertSame(pd.getNode("c"), tokenM.getNode());
   assertSame(pd.getNode("join"), tokenD.getNode());
 }