12-20-2013 04:15 AM
<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>
12-20-2013 04:21 AM
@Deployment
public void testAsycServiceNoListeners() {
INVOCATION = false;
// start process
runtimeService.startProcessInstanceByKey("asyncService");
// now there should be one job in the database:
assertEquals(1, managementService.createJobQuery().count());
// the service was not invoked:
assertFalse(INVOCATION);
waitForJobExecutorToProcessAllJobs(10000L, 25L);
// the service was invoked
assertTrue(INVOCATION);
// and the job is done
assertEquals(0, managementService.createJobQuery().count());
}
<process id="asyncService">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="service" />
<serviceTask id="service" activiti:class="org.activiti.engine.test.bpmn.async.AsyncService" activiti:async="true" />
<sequenceFlow id="flow2" sourceRef="service" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
12-23-2013 06:59 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.