As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<process id="my-process"> <startEvent id="start" /> <sequenceFlow id="flow1" sourceRef="start" targetRef="script1" /> <scriptTask id="script1" name="log" scriptFormat="groovy" activiti:autoStoreVariables="false"> <script>println("my-process-test-output")</script> </scriptTask> <sequenceFlow id="flow2" sourceRef="script1" targetRef="end" /> <endEvent id="end" /> </process>
<br> @Deployment<br> public void testAsycServiceNoListeners() { <br> INVOCATION = false;<br> // start process <br> runtimeService.startProcessInstanceByKey("asyncService");<br> // now there should be one job in the database:<br> assertEquals(1, managementService.createJobQuery().count());<br> // the service was not invoked:<br> assertFalse(INVOCATION);<br> <br> waitForJobExecutorToProcessAllJobs(10000L, 25L);<br> <br> // the service was invoked<br> assertTrue(INVOCATION); <br> // and the job is done<br> assertEquals(0, managementService.createJobQuery().count()); <br> }<br>
<br> <process id="asyncService"><br> <br> <startEvent id="theStart" /><br> <sequenceFlow id="flow1" sourceRef="theStart" targetRef="service" /><br> <br> <serviceTask id="service" activiti:class="org.activiti.engine.test.bpmn.async.AsyncService" activiti:async="true" /><br> <br> <sequenceFlow id="flow2" sourceRef="service" targetRef="theEnd" /><br> <br> <endEvent id="theEnd" /><br> <br> </process><br>