@Test public void testSetLocalScopeWithExecutionListenerStart() { testHelper.deploy(Bpmn.createExecutableProcess("process") .startEvent().id("activityId") .camundaExecutionListenerClass(ExecutionListener.EVENTNAME_START, ExecutionListener.class) .endEvent() .done()); engineRule.getRuntimeService().startProcessInstanceByKey("process"); }
@Test public void testSetLocalScopeWithExecutionListenerTake() { BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("process") .startEvent().id("activityId") .sequenceFlowId("sequenceFlow") .endEvent() .done(); CamundaExecutionListener listener = modelInstance.newInstance(CamundaExecutionListener.class); listener.setCamundaEvent(ExecutionListener.EVENTNAME_TAKE); listener.setCamundaClass(ExecutionListener.class.getName()); modelInstance.<SequenceFlow>getModelElementById("sequenceFlow").builder().addExtensionElement(listener); testHelper.deploy(modelInstance); engineRule.getRuntimeService().startProcessInstanceByKey("process"); }
@Test public void testSetLocalScopeInSubprocessWithStartExecutionListener() { testHelper.deploy(Bpmn.createExecutableProcess("process") .startEvent() .subProcess().embeddedSubProcess() .startEvent().id("activityId") .camundaExecutionListenerClass(ExecutionListener.EVENTNAME_START, ExecutionListener.class) .endEvent() .subProcessDone() .endEvent() .done()); engineRule.getRuntimeService().startProcessInstanceByKey("process"); }
@Test public void testSetLocalScopeWithExecutionListenerStart() { testHelper.deploy(Bpmn.createExecutableProcess("process") .startEvent().id("activityId") .camundaExecutionListenerClass(ExecutionListener.EVENTNAME_START, ExecutionListener.class) .endEvent() .done()); engineRule.getRuntimeService().startProcessInstanceByKey("process"); }
@Test public void testSetLocalScopeWithExecutionListenerTake() { BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("process") .startEvent().id("activityId") .sequenceFlowId("sequenceFlow") .endEvent() .done(); CamundaExecutionListener listener = modelInstance.newInstance(CamundaExecutionListener.class); listener.setCamundaEvent(ExecutionListener.EVENTNAME_TAKE); listener.setCamundaClass(ExecutionListener.class.getName()); modelInstance.<SequenceFlow>getModelElementById("sequenceFlow").builder().addExtensionElement(listener); testHelper.deploy(modelInstance); engineRule.getRuntimeService().startProcessInstanceByKey("process"); }
@Test public void testSetLocalScopeInSubprocessWithStartExecutionListener() { testHelper.deploy(Bpmn.createExecutableProcess("process") .startEvent() .subProcess().embeddedSubProcess() .startEvent().id("activityId") .camundaExecutionListenerClass(ExecutionListener.EVENTNAME_START, ExecutionListener.class) .endEvent() .subProcessDone() .endEvent() .done()); engineRule.getRuntimeService().startProcessInstanceByKey("process"); }