Search in sources :

Example 21 with WaitState

use of org.camunda.bpm.engine.test.standalone.pvm.activities.WaitState 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"));
}
Also used : WaitState(org.camunda.bpm.engine.test.standalone.pvm.activities.WaitState) PvmProcessInstance(org.camunda.bpm.engine.impl.pvm.PvmProcessInstance) ParallelGateway(org.camunda.bpm.engine.test.standalone.pvm.activities.ParallelGateway) PvmProcessDefinition(org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition) ProcessDefinitionBuilder(org.camunda.bpm.engine.impl.pvm.ProcessDefinitionBuilder) Automatic(org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic)

Example 22 with WaitState

use of org.camunda.bpm.engine.test.standalone.pvm.activities.WaitState 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"));
}
Also used : WaitState(org.camunda.bpm.engine.test.standalone.pvm.activities.WaitState) PvmProcessInstance(org.camunda.bpm.engine.impl.pvm.PvmProcessInstance) PvmProcessDefinition(org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition) ProcessDefinitionBuilder(org.camunda.bpm.engine.impl.pvm.ProcessDefinitionBuilder) Automatic(org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic)

Aggregations

ProcessDefinitionBuilder (org.camunda.bpm.engine.impl.pvm.ProcessDefinitionBuilder)22 PvmProcessDefinition (org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition)22 PvmProcessInstance (org.camunda.bpm.engine.impl.pvm.PvmProcessInstance)22 WaitState (org.camunda.bpm.engine.test.standalone.pvm.activities.WaitState)22 Automatic (org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic)20 PvmExecution (org.camunda.bpm.engine.impl.pvm.PvmExecution)11 End (org.camunda.bpm.engine.test.standalone.pvm.activities.End)11 EmbeddedSubProcess (org.camunda.bpm.engine.test.standalone.pvm.activities.EmbeddedSubProcess)8 ArrayList (java.util.ArrayList)6 ParallelGateway (org.camunda.bpm.engine.test.standalone.pvm.activities.ParallelGateway)6 ExecutionImpl (org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl)3 PvmExecutionImpl (org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl)2 EventScopeCreatingSubprocess (org.camunda.bpm.engine.test.standalone.pvm.activities.EventScopeCreatingSubprocess)2 HashMap (java.util.HashMap)1 FoxDeleteProcessInstanceCmd (org.camunda.bpm.engine.impl.cmd.FoxDeleteProcessInstanceCmd)1 ProcessDefinitionImpl (org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl)1 Decision (org.camunda.bpm.engine.test.standalone.pvm.activities.Decision)1 Test (org.junit.Test)1