you can use the same approach used in the WSHT implementation.<br>Persist the work item Id related with the business activity that cause the wait state.<br>In the Human task case, the work Item id is persisted in the node instance (that is running)  that causes the wait state<br>
<br><div class="gmail_quote">On Tue, Mar 30, 2010 at 4:45 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>
yes, I understand they are persisted, but once you reload a session, you have<br>
no knowledge of _which_ Processs Instance to use, and _which_ Work Item is<br>
the one that caused the flow to wait.<br>
<br>
Therefore I am looking for the way to save a workitem ID as a variablea,<br>
using a Variable Persistence mechanism.<br>
<br>
This way when the session is reloaded, I can do<br>
processInstance.getVariable(&quot;workItemId&quot;), which will return me an ID of the<br>
latest work item that caused this flow to wait.<br>
<div class="im"><br>
so let me try this again.. having a workitem, what would be the best<br>
approach to persist a WorkItemID using VariablePersistence?<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Drools-Flow-WORK-ITEM-ID-as-a-flow-variable-tp680939p686872.html" target="_blank">http://n3.nabble.com/Drools-Flow-WORK-ITEM-ID-as-a-flow-variable-tp680939p686872.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>