<!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;">
    creating a sub process instance throw error:  org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/shashwat21">Mehul Verma</a> in <i>jBPM Development</i> - <a href="http://community.jboss.org/message/548197#548197">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 have three process say P1,P2,P3. P1 is my main process which in turn calls P2 and P2 calls P3. In my case P1 executes fine and calls P2. When P2 reaches its End node i get this error. Folliwing are the process def. files for the processes.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><div>&lt;?xml version="1.0" encoding="ISO-8859-1"&#160; ?&gt;</div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;process-definition name="<strong>P-1</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;swimlane name="<strong>TestSwimlane</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;assignment pooled-actors="<strong>TestSwimlane</strong>" /&gt;</div></div><div>&#160; &lt;/swimlane&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;start-state name="<strong>s1</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;task name="<strong>s1</strong>"&#160; swimlane="<strong>TestSwimlane</strong>" /&gt;</div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;transition to="<strong>t1</strong>" name="<strong>to t1</strong>" /&gt;</div></div><div>&#160; &lt;/start-state&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;task-node name="<strong>t1</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;task name="<strong>t1</strong>"&#160; swimlane="<strong>TestSwimlane</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;controller allowAttachments="<strong>false</strong>" /&gt;</div></div><div>&#160; &lt;/task&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;transition to="<strong>e1</strong>" name="<strong>to e1</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;action class="<strong>com.mypack.process.action.CallProcess</strong>" config-type="<strong>bean</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;processName&gt;A-2&lt;/processName&gt;</div></div><div>&#160; &lt;/action&gt;</div></div></div><div>&#160; &lt;/transition&gt;</div></div></div><div>&#160; &lt;/task-node&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;end-state name="<strong>e1</strong>" /&gt;</div></div><div>&#160; &lt;/process-definition&gt;</div><div> </div><div> </div><div>Second Process:</div><div> </div><div><div>&lt;?xml version="1.0" encoding="ISO-8859-1"&#160; ?&gt;</div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;process-definition name="<strong>P-2</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;swimlane name="<strong>TestSwimlane</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;assignment pooled-actors="<strong>TestSwimlane</strong>" /&gt;</div></div><div>&#160; &lt;/swimlane&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;start-state name="<strong>s2</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;task name="<strong>s2</strong>"&#160; swimlane="<strong>TestSwimlane</strong>" /&gt;</div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;transition to="<strong>t2</strong>" name="<strong>to t2</strong>" /&gt;</div></div><div>&#160; &lt;/start-state&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;task-node name="<strong>t2</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;task name="<strong>t2</strong>"&#160; swimlane="<strong>TestSwimlane</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;controller allowAttachments="<strong>false</strong>" /&gt;</div></div><div>&#160; &lt;/task&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;transition to="<strong>e2</strong>" name="<strong>to e2</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;action class="<strong>com.mypack.process.action.CallProcess</strong>" config-type="<strong>bean</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;processName&gt;A-3&lt;/processName&gt;</div></div><div>&#160; &lt;/action&gt;</div></div></div><div>&#160; &lt;/transition&gt;</div></div></div><div>&#160; &lt;/task-node&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;end-state name="<strong>e2</strong>" /&gt;</div></div><div>&#160; &lt;/process-definition&gt;</div><div> </div><div> </div><div>Third Process:</div><div> </div><div><div>&lt;?xml version="1.0" encoding="ISO-8859-1"&#160; ?&gt;</div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;process-definition name="<strong>P-3</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;swimlane name="<strong>TestSwimlane</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;assignment pooled-actors="<strong>TestSwimlane</strong>" /&gt;</div></div><div>&#160; &lt;/swimlane&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;start-state name="<strong>s3</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;task name="<strong>s3</strong>"&#160; swimlane="<strong>TestSwimlane</strong>" /&gt;</div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;transition to="<strong>t3</strong>" name="<strong>to t3</strong>" /&gt;</div></div><div>&#160; &lt;/start-state&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;task-node name="<strong>t3</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;"><a class="jive-link-external-small" href="#">-</a> &lt;task name="<strong>t3</strong>"&#160; swimlane="<strong>TestSwimlane</strong>"&gt;</div><div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;controller allowAttachments="<strong>false</strong>" /&gt;</div></div><div>&#160; &lt;/task&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;transition to="<strong>e3</strong>" name="<strong>to e3</strong>" /&gt;</div></div><div>&#160; &lt;/task-node&gt;</div></div></div><div><div style="margin-left: 1em; text-indent: -2em;">&#160; &lt;end-state name="<strong>e3</strong>" /&gt;</div></div><div>&#160; &lt;/process-definition&gt;</div><div> </div><div>Code :</div><div> </div><div>public void execute(ExecutionContext executionContext) throws Exception {<p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // debug("entering call process action handler");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; String name = null;<p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {<p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name = getProcessName();&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ProcessInstance processInst = ProcessUtil.newProcessInstance(name);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Task task = Util.getStartTask(processInst.getProcessDefinition());<p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Token superProcessTOken = executionContext.getToken();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; processInst.setSuperProcessToken(superProcessTOken); <strong>// If i comment this line i don't get this error.</strong><br/><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><div>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ........code to extract caller data......</div><div><br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TaskInstance ti = Util.initProcess(processInst, task, values,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false);</div><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (ti != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // setup the swimlane instance<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Swimlane swm = ti.getTask().getSwimlane();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (s != null) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; String assignment = swm.getPooledActorsExpression();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (!Strings.isEmpty(assignment)) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ti.getSwimlaneInstance().setPooledActors(<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; assignment.split(","));<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ti.end();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</div><div> </div><div> </div><div>I hope now you can understand.</div><div> </div></div></div></div></div></div></div></div></div></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/548197#548197">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>