Hi all,
I've some trouble with Executions. Here is my process:
<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions id="ServiceTaskJava" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 BPMN20.xsd" xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/" xmlns:jbpm="http://jbpm.org/4.0/bpmn2"> <bpmn:process id="bar" name="my bar"> <bpmn:startEvent id="s" /> <bpmn:sequenceFlow id="f1" name="s_2_r1" sourceRef="s" targetRef="r1" /> <bpmn:receiveTask id="r1" name="R1" /> <bpmn:sequenceFlow id="f2" name="r1_2_e" sourceRef="r1" targetRef="e" /> <bpmn:endEvent id="e" name="E" /> </bpmn:process></bpmn:definitions>
If I signal task "r1" I would assume, that the next task ("e") will be received and the process instance is ended. I've written a short test case for this:
@Test public void oneReceiveNode(){ //deploy process repositoryService.createDeployment().addResourceFromClasspath("one_receive_node.bpmn.xml").deploy(); //start instance ProcessInstance instance = executionService.startProcessInstanceByKey("bar"); Assert.assertNotNull(instance); //signal first execution Execution e1 = instance.findActiveExecutionIn("r1"); Assert.assertNotNull(e1); executionService.signalExecutionById(e1.getId()); Assert.assertTrue(instance.isEnded()); }
The last assert fails. Can anyone tell me why?
Thanks in advance - Claus