<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Joining of non-concurrent decision paths seems to be broken in 4.4
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/h.peter">Peter Horvath</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/555138#555138">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello All,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We have a quite complicated process definion with a lot of cases where a step has to be executed only on specific condition - something like the following diagram (see attached full example process definition JPDL file):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="http://community.jboss.org/servlet/JiveServlet/showImage/4429/ForkJoinTest.png"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/4429/450-189/ForkJoinTest.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We used join nodes with <strong style="font-family: courier new,courier; ">multiplicity="1"</strong> setting to join the two possible outcome paths of the decision node:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong style="font-family: courier new,courier; ">&lt;join g="347,51,48,48" multiplicity="1" name="join1"&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;transition g="424,76:-7,-17" name="to join2" to="join2"/&gt;<br/>&lt;/join&gt;</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This approach used to work OK with JBPM 4.3 but it fails with version 4.4.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It seems that the handling of join nodes has been changed in this version: the first join node sets state to ended on the incoming execution which is not destroyed at that step but is delegated through to the outgoing transition, so the next join node (the last one before the end in the example) fails with the following exception:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;">Exception in thread "main" org.jbpm.api.JbpmException: execution[ForkJoinTest.10001.to script2.10002] is not active: ended<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.model.ExecutionImpl.checkActive(ExecutionImpl.java:1084)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:481)<br/>&#160;&#160;&#160; at org.jbpm.jpdl.internal.activity.ForkActivity.execute(ForkActivity.java:95)<br/>&#160;&#160;&#160; at org.jbpm.jpdl.internal.activity.ForkActivity.execute(ForkActivity.java:46)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:63)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)<br/>&#160;&#160;&#160; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:67)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For me, this seems to be a bug - clearly, the behaviour of JBPM has been changed between version 4.3 and 4.4. The attached process definition is executed correctly with JBPM 4.3.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>What do you think about this?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Regards,</p><p>Peter</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/555138#555138">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>