<!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;">
    Re: Strange behavior with JBPM 4.4 and nested fork/joins with Multiplicity
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/k0k0pelli">Silvio Meier</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/594050#594050">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>As nobody answers, I'd like to illustrate the problem again with a simplerexample as given above. The following example shows the above problem in asimplified way:</p><p><a href="http://community.jboss.org/servlet/JiveServlet/showImage/2-594050-14573/Test.png"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/2-594050-14573/450-366/Test.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We have 2 fork/join elments that are nested. The outer fork/join(fork1/join1) contains task1 that is executed in parallel with the innerfork/join (fork2/join2). The inner fork join consists of task2 and task3, whichare alternatives that are chosen by a decision (exclusive1). Task 4 executes inparallel to task2 or task3, depending on the alternative that is chosen. Becausethere are three transitions ending in the inner join activity (join2), amultiplicity must be specified, as otherwise the join does not go on with itsexecution.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>However, with the current implementation of jBPM 4.4, depending on the waythe workflow is executed, a strange behavior can be created.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Executing first task1, causes anormal execution, i.e., all tasks are executed as expected. However, finishingfirst the inner join activity (join2) leads to a strange behavior, which is dueto the bug fix of described in <a class="jive-link-external-small" href="https://issues.jboss.org/browse/JBPM-2720?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel">https://issues.jboss.org/browse/JBPM-2720?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel</a>.The bugfix in the mentioned Jira ticket terminates *all* executions that didnot arrive in any&#160; join, if there is amultiplicity given in the join activity, which is probably the source of&#160; the problem. It should just kill thenon-finished executions that end in the join activity to complete and not *all*(concurrent) executions.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If task2 or task3, respectively, and task4 are finished before task1,&#160; the procedure completing the inner joinactivity (join2) deletes also the active exection of task1, even though thisshould not be the case.</p><p>From my point of view, there are three possible solutions:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ol><li>We introduce a flag for switching the kill mechanismoff, as this was suggested in the above mentioned Jira ticket. However, I didnot find anything like that in the implementation. This is maybe the simplersolution as the one suggested in </li><li>Running exections are aborted only iff they will end inthe join to complete.</li><li>Remodeling the workflow using no nested join/forks. However, this solutions is not possible in every case. </li></ol><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Did someone encounter the same problems and is there a simpler solution thanthe three soluteonsd above?</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/594050#594050">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>