Let's say this is the workflow:
[img]http://img198.imageshack.us/img198/9325/screenshotukr.png[/img]
<process name="phoneCheckProcess" key="PCP"
xmlns="http://jbpm.org/4.0/jpdl">
| <start g="72,187,48,48" name="start">
| <transition to="phoneCheck"/>
| </start>
|
| <state continue="async" g="211,178,92,52"
name="phoneCheck">
| <on event="start">
| <event-listener class="eventListener.MyEventListener"/>
| </on>
| <transition to="proceed"/>
| </state>
| <state g="390,181,92,52" name="proceed">
| <transition to="end"/>
| </state>
| <end g="601,186,48,48" name="end"
state="finished"/>
| </process>
When execution reaches MyEventListener, I call a web-service that is asynchronous (for
testing purposes i use a mock). When that function completes, it calls a callbackHandler.
I have a class that keeps a static processEngine so that I can access it from my test case
and callback handler.
In my test case;
ProcessInstance processInstance =
MyController.getInstance().getExecutionService().startProcessInstanceByKey("PCP");
| Execution executionInQuery =
processInstance.findActiveExecutionIn("phoneCheck");
| assertNotNull("Supposed to be <phoneCheck>", executionInQuery);
Here, things go like this. The web-service is called, and it calls the calbackHandler. The
callback handler, accesses the static Process engine and does the following:
ProcessInstance instance =
getInstance().getExecutionService().signalExecutionById(executionId);
where execution id is retrieved from the eventListener.
Now this gives me the exception that the executionId does not exist. I cannot figure this
out. I have been trying various things here, but it still doesn't work. Any help or
ideas would be greatly appreciated.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242178#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...