[jboss-user] [jBPM Users] - Re: workflow design about wait states

mmusaji do-not-reply at jboss.com
Fri Sep 11 06:05:01 EDT 2009

I understand what you said earlier Ronald, having trouble implementing this in a Junit test.

I've added a state in my workflow which will wait until signal recieved. Its after the join in the above example. I wont paste the whole workflow again, hope that's ok.

My Unit test is 
public void testSimple() throws Exception {
  |         ProcessInstance processInstance = executionService.startProcessInstanceByKey("process", variables);
  |         String processInstanceId = processInstance.getId();
  |         String executionId = processInstance.findActiveExecutionIn("wait").getId();
  |         processInstance = executionService.signalExecutionById(executionId, "continue");
  | }

Problem is I always get null pointer exception as no execution is found in "wait". I presume what is happening is similar to a problem I had before when the async processes from fork carry on, my unit test in a seperate thread carries on and the wait state isn't there yet.

Any suggestions?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254695#4254695

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254695

More information about the jboss-user mailing list