use of org.camunda.bpm.engine.test.standalone.pvm.activities.ReusableSubProcess 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());
}
Aggregations