[jboss-user] [jBPM] - working with executions
Claus Straube
do-not-reply at jboss.com
Wed Mar 24 09:19:37 EDT 2010
Claus Straube [http://community.jboss.org/people/clauss] created the discussion
"working with executions"
To view the discussion, visit: http://community.jboss.org/message/533712#533712
--------------------------------------------------------------
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 http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://schema.omg.org/spec/BPMN/2.0 http://schema.omg.org/spec/BPMN/2.0 BPMN20.xsd" xmlns:bpmn=" http://schema.omg.org/spec/BPMN/2.0 http://schema.omg.org/spec/BPMN/2.0" typeLanguage=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema" expressionLanguage=" http://www.w3.org/1999/XPath http://www.w3.org/1999/XPath" targetNamespace=" http://sample.bpmn.camunda.com/ http://sample.bpmn.camunda.com/" xmlns:jbpm=" http://jbpm.org/4.0/bpmn2 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
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533712#533712]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100324/2583f0e8/attachment.html
More information about the jboss-user
mailing list