use of org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic in project camunda-bpm-platform by camunda.
the class PvmParallelTest method testJoinForkCombinedInOneParallelGateway.
public void testJoinForkCombinedInOneParallelGateway() {
PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder().createActivity("start").initial().behavior(new Automatic()).transition("fork").endActivity().createActivity("fork").behavior(new ParallelGateway()).transition("c1").transition("c2").transition("c3").endActivity().createActivity("c1").behavior(new Automatic()).transition("join1").endActivity().createActivity("c2").behavior(new Automatic()).transition("join1").endActivity().createActivity("c3").behavior(new Automatic()).transition("join2").endActivity().createActivity("join1").behavior(new ParallelGateway()).transition("c4").transition("c5").transition("c6").endActivity().createActivity("c4").behavior(new Automatic()).transition("join2").endActivity().createActivity("c5").behavior(new Automatic()).transition("join2").endActivity().createActivity("c6").behavior(new Automatic()).transition("join2").endActivity().createActivity("join2").behavior(new ParallelGateway()).transition("end").endActivity().createActivity("end").behavior(new WaitState()).endActivity().buildProcessDefinition();
PvmProcessInstance processInstance = processDefinition.createProcessInstance();
processInstance.start();
assertNotNull(processInstance.findExecution("end"));
}
use of org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic in project camunda-bpm-platform by camunda.
the class PvmReusableSubProcessTest method testReusableSubProcess.
public void testReusableSubProcess() {
PvmProcessDefinition subProcessDefinition = new ProcessDefinitionBuilder().createActivity("start").initial().behavior(new Automatic()).transition("subEnd").endActivity().createActivity("subEnd").behavior(new End()).endActivity().buildProcessDefinition();
PvmProcessDefinition superProcessDefinition = new ProcessDefinitionBuilder().createActivity("start").initial().behavior(new Automatic()).transition("subprocess").endActivity().createActivity("subprocess").behavior(new ReusableSubProcess(subProcessDefinition)).transition("superEnd").endActivity().createActivity("superEnd").behavior(new End()).endActivity().buildProcessDefinition();
PvmProcessInstance processInstance = superProcessDefinition.createProcessInstance();
processInstance.start();
assertTrue(processInstance.isEnded());
}
use of org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic in project camunda-bpm-platform by camunda.
the class PvmTest method testPvmAutomatic.
public void testPvmAutomatic() {
PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder().createActivity("a").initial().behavior(new Automatic()).transition("b").endActivity().createActivity("b").behavior(new Automatic()).transition("c").endActivity().createActivity("c").behavior(new WaitState()).endActivity().buildProcessDefinition();
PvmProcessInstance processInstance = processDefinition.createProcessInstance();
processInstance.start();
assertNotNull(processInstance.findExecution("c"));
}
Aggregations