use of org.activiti.engine.test.pvm.activities.ReusableSubProcess in project Activiti by Activiti.
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