-
1. Re: Ok, what am I missing?
steveotto999 Dec 29, 2006 1:23 PM (in response to steveotto999)
Please, someone? If I am being stupid, just tell me where I should look... -
2. Re: Ok, what am I missing?
kukeltje Dec 31, 2006 6:53 AM (in response to steveotto999)be patient... you posted on thursday and expect an answer the next day??? come on....
Stepping through a process with forks means you have to know which token to signal..... just store it somewhere with your other data
Regarding the simulation, this means that jBPM ide does not support it. Since jbpm has a clean api, you can 'simulate' via unittests but this is not as advanced as other, high cost, engines have it. -
3. Re: Ok, what am I missing?
steveotto999 Jan 2, 2007 6:37 PM (in response to steveotto999)Ronald, thanks for your help.
I've been trying to follow your suggestion but I have been unable to get some thing to work.
I've added the following test case to the HelloWorld test program in the distro.
Could you tell me what I should do to follow the execution down "path2"?
--stevepublic void testProcessWithForkAndJoin() { ProcessDefinition processDefinition = ProcessDefinition.parseXmlString( "<process-definition>" + " <start-state>" + " <transition to='phase one' />" + " </start-state>" + " <state name='phase one'>" + " <transition to='fork1' />" + " </state>" + " <fork name='fork1'>" + " <transition name='tr1' to='path1' />" + " <transition name='tr2' to='path2' />" + " </fork>" + " <state name='path1'>" + " <transition to='join1' />" + " </state>" + " <state name='path2'>" + " <transition to='join1' />" + " </state>" + " <join name='join1'>" + " <transition to='end' />" + " </join>" + " <end-state name='end' />" + "</process-definition>" ); ProcessInstance processInstance = new ProcessInstance(processDefinition); Token token = processInstance.getRootToken(); assertSame(processDefinition.getStartState(), token.getNode()); token.signal(); assertSame(processDefinition.getNode("phase one"), token.getNode()); token.signal(); assertSame(processDefinition.getNode("fork1"), token.getNode()); token.signal("tr1"); assertEquals("path1", token.getNode().getName()); // correct up to here // how do I take path2? Nothing I've tried seems to work }
-
4. Re: Ok, what am I missing?
kukeltje Jan 3, 2007 12:49 PM (in response to steveotto999)look at the testcases... there you will find exactely what you are looking for.
-
5. Re: Ok, what am I missing?
steveotto999 Jan 3, 2007 5:05 PM (in response to steveotto999)Ah!
Thanks again, Ronald.
I found what I was looking for in the directory java.jbpm.test, in the package:
org.jbpm.jpdl.patterns
Hopefully now I can progress up the learning curve.
--Steve -
6. Re: Ok, what am I missing?
kukeltje Jan 3, 2007 8:29 PM (in response to steveotto999)you'll be surprised. it's not that steap or long. Just do *not* think in terms of prgrogramming (loops etc...)