the processInstanceId is very related with the business information that you store about the business entity that you want to process.<br>If you are designing the solution, you must propose where do you want to store it. I don&#39;t know your business entities so I cannot suggest where to store that information.<br>
If you don&#39;t have another stateful thing, the information can go to the database.<br><br><div class="gmail_quote">On Tue, Mar 30, 2010 at 2:49 PM, tolitius <span dir="ltr">&lt;<a href="mailto:webakaunt@gmail.com">webakaunt@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
ok, let me be more specific.<br>
<br>
Wait state is reached (request is sent to an external system), the flow is<br>
persisted, the thread that persisted the flow is gone.<br>
<br>
Now, the response came back from the external system, and now would be a<br>
good time to resume the flow (reload the session):<br>
<div class="im"><br>
StatefulKnowledgeSession ksession =<br>
JPAKnowledgeService.loadStatefulKnowledgeSession( sessionId, kbase, null,<br>
env );<br>
<br>
</div>let&#39;s say the session is resumed. Now, having a &quot;ksession&quot;, how do I get to<br>
<div class="im">the right PROCESS_INSTANCE_ID, so I can ksession.getProcessInstance()?<br>
<br>
Thank you,<br>
/Anatoly<br>
<br>
</div>( P.S. No HTTP Session, no other stateful things besides DB. I would not<br>
want to have my business entities know about something as low level as a<br>
Drools Flow session )<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://n3.nabble.com/Drools-Flow-Getting-to-the-right-Process-from-the-re-loaded-Session-tp686219p686532.html" target="_blank">http://n3.nabble.com/Drools-Flow-Getting-to-the-right-Process-from-the-re-loaded-Session-tp686219p686532.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>