<!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;">
    Incorrect Gateway diverge and converge operations in jBPM 5
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/khalipili">shashi mhatre</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/581930#581930">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I am using below sample flow in my test. it contains three human task. once the process process is started it execute successfully till human task creation. As the first gateway diverge is of type "AND" it creates two task as shown below. I can view these task in jbpm-console. now once i login as user "Shashi" and complete the first task, As the next gateway converge is of type "XOR", the flow proceeds further and create the next task for user "Shashi".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As process have proceed further till gateway converge, jbpm should have remove the task for user "kris". but jbpm still shows the task for user "kris".</p><p>this seems to be a error in jbpm process execution.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>next once user "shashi" completes the human task, process execution completes but throws below error. it seems that human task handler tries to abort the "kris" task which should have be aborted prior (at gateway converge).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p><p>java.lang.IllegalArgumentException: attempt to create merge event with null entity</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.event.MergeEvent.&lt;init&gt;(MergeEvent.java:60)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.event.MergeEvent.&lt;init&gt;(MergeEvent.java:43)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:688)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:692)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:235)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.persistence.processinstance.JPAWorkItemManager.abortWorkItem(JPAWorkItemManager.java:124)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.command.runtime.process.AbortWorkItemCommand.execute(AbortWorkItemCommand.java:56)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.command.runtime.process.AbortWorkItemCommand.execute(AbortWorkItemCommand.java:29)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:274)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.abortWorkItem(CommandBasedStatefulKnowledgeSession.java:149)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.sample.util.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:257)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:662)</p><p>[2011:01:19 17:01:78:exception] Uncaught exception on client</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>.<a href="http://community.jboss.org/servlet/JiveServlet/showImage/2-581930-11171/Sample-ProcessFlow.png"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/2-581930-11171/450-531/Sample-ProcessFlow.png </span></a></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/581930#581930">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>