[jboss-user] [jBPM] - Why does my Fork end 3 times instead of 2 (in jBPM 4.3)?

Johan Dykström do-not-reply at jboss.com
Thu Apr 29 08:36:29 EDT 2010


Johan Dykström [http://community.jboss.org/people/jody4711] created the discussion

"Why does my Fork end 3 times instead of 2 (in jBPM 4.3)?"

To view the discussion, visit: http://community.jboss.org/message/540136#540136

--------------------------------------------------------------
Hi all,
I have a process with some forks and joins, and some custom activities in it. My problem is that one of the forks, which has two outgoing transitions, ends three times, and therefore continues execution twice in one of the transitions. Nothing is executed in parallel, everything is executed in the main thread, triggered by signals from the JUnit test case.

In the real application, each custom activity will trigger a long-running calculation in another JVM, and then wait for a signal. The other JVM will reply by JMS to a callback listener, which will in turn signal to the execution engine. In the attached test case, the custom activities just print a line before waiting, and the test case simulates the callbacks by sleeping for a while before sending a signal.

The interesting part of the log file (also attached) is this:

13:49:41,069 : Fork2 starting  : execution = ForkTest.7.10        : thread = main
13:49:41,101 : Fork2 ending    : execution = ForkTest.7.11        : thread = main   <--- 1
13:49:41,101 : Join1 starting  : execution = ForkTest.7.11        : thread = main
13:49:41,101 : Fork2 ending    : execution = ForkTest.7.12        : thread = main   <--- 2
13:49:41,101 : Join2 starting  : execution = ForkTest.7.12        : thread = main
13:49:41,101 : Fork2 ending    : execution = ForkTest.7.10        : thread = main   <--- 3
13:49:41,101 : Join1 starting  : execution = ForkTest.7.10        : thread = main
Rather strange considering the definition of the fork in the process:

<fork g="213,346,48,48" name="Fork2">
    <on event="start"><event-listener/></on>
    <on event="end"><event-listener/></on>
    <transition to="Join1"/>
    <transition to="Join2"/>
</fork>
The versions I use are:

JDK 1.6.0
jBPM 4.3
HSQL 1.8.0

I hope someone can help me with this problem!

Regards, Johan

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/540136#540136]

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/20100429/3fa066ed/attachment.html 


More information about the jboss-user mailing list