<!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">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;">
    The external Trigger makes the transition from subprocess node to the next node while subprocess is active.
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/FelixKJose">Felix Jose</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/548919#548919">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi Maceij,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank you for your reply. The JBPM-2874,&#160; the test case "testSubProcessWithStateFailure" is making the transition from the subprocess node to the next node using the main process instance id while the subprocess is in "wait" state. And then checking the process stateagainst the subprocess state. And my doubt is why the JBPM is not throwing any exception? Because</p><ol start="1"><li>The sub process is in active state(wait state).<br/></li><li>The main process is not making the transition over the sub process nodes.<br/></li></ol><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So whether only a state check will do the solution or make a change in the implementation class of executionService's "<span style="font-size: 10pt;">signalExecutionById" method to check the subprocess instance is active or not and</span> throw an exception saying the "Invalid transition. Subprocess [subprocess id =&lt;Sub 19&gt;] is active." <span style="font-size: 10pt;">while the sub process is active.</span></p><p><span style="font-size: 10pt;">And should not able to transition from sub process node to next node.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">Please let me know about your thoughts on the same.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">By using ExecutionImpl I am getting the subprocess Id and using that I am able to transition through the subprocess nodes.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>ExecutionImpl subExecutionImpl = executionImpl.getSubProcessInstance();</p><p><span style="font-size: 10pt;">Because by using the ExecutionImpl I can get the subprocessId and main processId. But when I am doing a transition (</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>executionService<span style="color: #0000c0; font-size: 10pt; ">.signalExecutionById(executionImpl.getId())</span></em></p><br/><br/><span> </span><p><span style="font-size: 10pt;">from subprocess node to the next node, it is happening successfully, while the subprocess is active(wait). This is not the intended output.</span></p><p><span style="font-size: 10pt;">My expected result in this case is "<span style="color: #ff0000;">throw an exception saying the "Invalid transition. Subprocess [subprocess id =&lt;Sub 19&gt;] is active."</span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please give me a reply regarding this as soon as possible.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank You and Regards,</p><p>Felix K Jose</p><br/><br/><span> </span><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><br/><br/><span> </span><p><em style=": ; color: #0000c0; font-size: 10pt; ">executionService</em><span style="color: #0000ff; font-size: 10pt; ">.signalExecutionById(subExecutionImpl.getId());</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #000000; font-size: 10pt; ">But please let me know how the ExecutionImpl will do the workaround?</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><br/><br/></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/548919#548919">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>