Examples of PvmExecution


Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(innerscope)");
    expectedEvents.add("start on Activity(wait)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);

    PvmExecution execution = processInstance.findExecution("wait");
    execution.signal(null, null);
   
    expectedEvents.add("end on Activity(wait)");
    expectedEvents.add("end on Activity(innerscope)");
    expectedEvents.add("end on Activity(outerscope)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(waitInFirst)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    PvmExecution execution = processInstance.findExecution("waitInFirst");
    execution.signal(null, null);
   
    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(waitInFirst)");
    expectedEvents.add("end on Activity(firstMostInnerNestedActivity)");
    expectedEvents.add("end on Activity(firstInnerScope)");
    expectedEvents.add("start on Activity(secondInnerScope)");
    expectedEvents.add("start on Activity(secondMostInnerNestedActivity)");
    expectedEvents.add("start on Activity(waitInSecond)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    execution = processInstance.findExecution("waitInSecond");
    execution.signal(null, null);
   
    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(waitInSecond)");
    expectedEvents.add("start on Activity(end)");
    expectedEvents.add("end on Activity(end)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(waitInFirst)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    PvmExecution execution = processInstance.findExecution("waitInFirst");
    execution.signal(null, null);
   
    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(waitInFirst)");
    expectedEvents.add("end on Activity(firstMostInnerNestedActivity)");
    expectedEvents.add("end on Activity(firstInnerScope)");
    expectedEvents.add("start on Activity(secondInnerScope)");
    expectedEvents.add("start on Activity(secondMostInnerNestedActivity)");
    expectedEvents.add("start on Activity(waitInSecond)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    execution = processInstance.findExecution("waitInSecond");
    execution.signal(null, null);
   
    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(waitInSecond)");
    expectedEvents.add("start on Activity(end)");
    expectedEvents.add("end on Activity(end)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    processInstance.start();

    assertEquals(500L, processInstance.getVariable("amount"));
    assertEquals("hello world", processInstance.getVariable("msg"));

    PvmExecution activityInstance = processInstance.findExecution("a");
    assertEquals(500L, activityInstance.getVariable("amount"));
    assertEquals("hello world", activityInstance.getVariable("msg"));
   
    Map<String, Object> expectedVariables = new HashMap<String, Object>();
    expectedVariables.put("amount", 500L);
    expectedVariables.put("msg", "hello world");

    assertEquals(expectedVariables, activityInstance.getVariables());
    assertEquals(expectedVariables, processInstance.getVariables());
  }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(c2)");
   
    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    PvmExecution execution = processInstance.findExecution("c1");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c1)");
    expectedEvents.add("end on Activity(noscope)");
    expectedEvents.add("start on Activity(join)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    execution = processInstance.findExecution("c2");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c2)");
    expectedEvents.add("end on Activity(noscope)");
    expectedEvents.add("start on Activity(join)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(c2)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    PvmExecution execution = processInstance.findExecution("c1");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c1)");
    expectedEvents.add("end on Activity(scope)");
    expectedEvents.add("start on Activity(join)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    execution = processInstance.findExecution("c2");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c2)");
    expectedEvents.add("end on Activity(scope)");
    expectedEvents.add("start on Activity(join)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(c2)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    PvmExecution execution = processInstance.findExecution("c1");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c1)");
    expectedEvents.add("end on Activity(scope)");
    expectedEvents.add("start on Activity(join)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    execution = processInstance.findExecution("c2");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c2)");
    expectedEvents.add("end on Activity(scope)");
    expectedEvents.add("start on Activity(join)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    expectedEvents.add("start on Activity(c2)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    PvmExecution execution = processInstance.findExecution("c1");
    execution.signal(null, null);

    expectedEvents = new ArrayList<String>();
    expectedEvents.add("end on Activity(c1)");
    expectedEvents.add("start on Activity(join)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);
    eventCollector.events.clear();
   
    execution = processInstance.findExecution("c2");
   
    // this process gets blocked in the join
    execution.signal(null, null);
  }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

    List<String> expectedActiveActivityIds = new ArrayList<String>();
    expectedActiveActivityIds.add("wait");
    assertEquals(expectedActiveActivityIds, processInstance.findActiveActivityIds());
   

    PvmExecution execution = processInstance.findExecution("wait");
    execution.signal(null, null);
   
    assertTrue(processInstance.isEnded());
   
  }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution

   
    PvmProcessInstance processInstance = processDefinition.createProcessInstance();
    processInstance.start();
   
    assertFalse(processInstance.isEnded());
    PvmExecution execution = processInstance.findExecution("wait");
    execution.signal(null, null);
   
    assertTrue(processInstance.isEnded());
  }
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.