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());
  }
Exemplo n.º 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;
 }
 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());
 }