Hi Alberto,<div>yes you can, the only thing that you need to do is deal with those I/O blocking operations as external and Async Tasks. Instead of making your Task sync (which will block by definition until your operations are done) just make them async by removing the completeWorkItem() method call from inside the workItemHandler. Then when you I/O&#39;s are done, you will need to call the completeWorkItem using ksession.getWorkItemManager().completeWorkItem() method.</div>

<div><br></div><div>Cheers<br><br><div class="gmail_quote">On Wed, Oct 17, 2012 at 1:35 PM, Alberto R. Galdo <span dir="ltr">&lt;<a href="mailto:argaldo@gmail.com" target="_blank">argaldo@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All, <div><br></div><div>   We have an application where we are using JBPM for our processes. In our application there&#39;s a strong requirement to maintain the same KnowledgeSession between restarts even though that we are not using rules at all, just BPMN 2.0 processes ( we are aware that JBPM needs it to maintain process state, workitem state and so on ...  but don&#39;t need neither rules nor ReteOO loops in our app ).</div>



<div><br></div><div>   Now we got to the tricky task handling part, were we have several handlers that depend on I/O which blocks the entire execution of the processes. And just because all our application depends on the *same* shared stored knowledge session, all our other parallel processes that need to execute processes are waiting ( like in a queue ) for the I/O to finish and execute themselves whenever the execution of JBPM gets blocked by I/O.</div>



<div><br></div><div>   We&#39;ve tried to execute our handlers in different threads, but as we are running inside a persisted environment JBPM looses the JTA transaction as it is not bound to the current thread. Seems not a solution. We tried then to implement thread communication mechanisms, yield() and notify() and just made the problem worse.</div>



<div><br></div><div>   Any insights on the subject? How can we execute parallel non-blocking processes inside a shared and persisted KnowlegdeSession with JBPM?</div><div><br></div><div>Greets,  <span class="HOEnZb"><font color="#888888"><br>

<div><br clear="all">
Alberto R. Galdo<br>
<a href="mailto:argaldo@gmail.com" target="_blank">argaldo@gmail.com</a><br><br><br><br>
</div></font></span></div>
<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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div> - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>

 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div><br>
</div>