[jBPM Users] - Signaling executions for processes that containt tasks does
by LMarinkov
I wrote some unit tests using jbpm 4.1 and noticed that errors occur when executions containing task are signalled. I decided to check if the unit test SignalExecutionTest.java written by Tom Baeyens works properly with tasks. Regretfully error occurs also with the SignalExecutionTest if tasks are used instead of state!
This is the link to the test on SVN:
http://anonsvn.jboss.org/repos/jbpm/jbpm4/tags/jbpm-4.1/modules/test-db/s...
I modified the process definitions in SignalExecutionTest so tasks are used instead of state:
| ...
| deployJpdlXmlString(
| "<process name='Insurance claim' key='ICL'>" +
| " <start>" +
| " <transition to='a' />" +
| " </start>" +
| " <task name='a'>" +
| " <transition to='b' />" +
| " <task>" +
| " <task name='b' />" +
| "</process>"
| );
| ...
| deployJpdlXmlString(
| "<process name='Insurance claim' key='ICL'>" +
| " <start>" +
| " <transition to='a' />" +
| " </start>" +
| " <task name='a'>" +
| " <transition to='b' />" +
| " </task>" +
| " <task name='b' />" +
| "</process>"
| );
| ...
| deployJpdlXmlString(
| "<process name='p'>" +
| " <start>" +
| " <transition to='a' />" +
| " </start>" +
| " <task name='a' />" +
| "</process>"
| );
|
Also the unit test org.jbpm.test.history.AvgDurationTest will not work if one replaces state with task as seen below:
| deployJpdlXmlString(
| "<process name='Insurance claim' key='ICL'>" +
| " <start>" +
| " <transition to='one' />" +
| " </start>" +
| " <task name='one'>" +
| " <transition to='two' />" +
| " <task>" +
| " <task name='two'>" +
| " <transition to='three' />" +
| " </task>" +
| " <task name='three'>" +
| " <transition to='end' />" +
| " </task>" +
| " <end name='end' />" +
| "</process>"
| );
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254732#4254732
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254732
15 years, 4 months
[jBPM Users] - Re: workflow design about wait states
by kukeltje
I never said you should remove async in your final version I just metioned it as one of the things to try in finding the cause. And that should be possible shouldn't it?
Correct, the custom node class async but once it is finished it does nothing. If you want it to leave the node, you have to add execution.take(); If you do not want it to leave directly after it finished in the execute, add a execution.waitForSignal() and implement the signal(...) method. Again, see the examples.
The way you do in now, your process is in an undefined state. And if in a unit test you manually execute the async jobs (see the examples again) you can check in what custom nodes the executions are in. That is how you should use unittests. The examples are very good for this.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254731#4254731
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254731
15 years, 4 months