<div> </div>
<div>Thanks Kris for your input. It would be great if you could share us on sample code snippet how to acheive this ObjectMarshallingStrategy for ProcessInstances .</div>
<div> </div>
<div>Also confirm us by using this approach the process is avialable for drools rule constraints to take decisions.</div>
<div> </div>
<div>Thanks</div>
<div>Prem<br><br></div>
<div class="gmail_quote">On Thu, Oct 8, 2009 at 4:07 PM, Kris Verlaenen <span dir="ltr">&lt;<a href="mailto:kris.verlaenen@cs.kuleuven.be">kris.verlaenen@cs.kuleuven.be</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">This is indeed a special case.  Process instances are already stored as<br>part of the session runtime state, so no need to store them again as<br>
part of the working memory.  You need to register a custom<br>ObjectMarshallingStrategy for ProcessInstances in the working memory<br>that simply retrieves them from the session state.<br><br>Kris<br>
<div>
<div></div>
<div class="h5"><br>Quoting PremKumar s &lt;<a href="mailto:premkumar.sivanandan@gmail.com">premkumar.sivanandan@gmail.com</a>&gt;:<br><br>&gt; Hi,<br>&gt;<br>&gt;<br>&gt;<br>&gt;       I am evaluating the drools expert with drool flow using<br>
&gt; TimeManagement<br>&gt; System. I am inserting the process instance into working memory of<br>&gt; drools<br>&gt; [session.insert(workflowProcessInstance)]  So that the rules can use<br>&gt; the<br>&gt; process instance as part of Rule constraints to enable the rules to<br>
&gt; make<br>&gt; more sophisticated decisions based on the state of the current<br>&gt; process<br>&gt; instance.<br>&gt;<br>&gt;<br>&gt;<br>&gt; Rule snippet<br>&gt;<br>&gt;<br>&gt;<br>&gt; rule &quot;Submit Time&quot;  ruleflow-group &quot;Submit Time&quot;<br>
&gt;        dialect &quot;java&quot;<br>&gt;        when<br>&gt;<br>&gt;                processInstance:WorkflowProcessInstance()<br>&gt;<br>&gt;                tkRequest:TKRequest ()<br>&gt;                tkRequestDAO:TKRequestDAO()<br>
&gt;        then<br>&gt;<br>&gt;                     // check the current processInstance state as<br>&gt; Active<br>&gt; then do that<br>&gt;<br>&gt;                        //Do custom operation, status change,<br>&gt; persistence<br>
&gt; update<br>&gt;<br>&gt;        end<br>&gt;<br>&gt;<br>&gt;<br>&gt;        The approach is works fine with using<br>&gt; KnowledgeBuilder.newStatefulKnowledgeSession() that is no<br>&gt; persistence.  But<br>&gt; once i have enabled the Persistence using<br>
&gt; JPAKnowledgeService.newStatefulKnowledgeSession(know, null,<br>&gt; getEnvironment())  it throws stack over flow error due the<br>&gt; workflowProcessInstance is not serialized while trying to persist the<br>&gt; newly<br>
&gt; added workflowProcessInstance  to working memory.<br>&gt;<br>&gt;<br>&gt;<br>&gt;            Once i have commented the<br>&gt; session.insert(workflowProcessInstance)<br>&gt; the stack overflow error is gone but none of my rules are not<br>
&gt; executed.<br>&gt;<br>&gt;<br>&gt;<br>&gt; Can some one provide guidance on how to pass this<br>&gt; workflowProcessInstance to<br>&gt; rule constriant with persistence JPAKnowledgeSession enabled.<br>&gt;<br>&gt;<br>
&gt;<br>&gt; Thanks<br>&gt;<br>&gt; Prem<br>&gt;<br><br><br><br><br></div></div>Disclaimer: <a href="http://www.kuleuven.be/cwis/email_disclaimer.htm" target="_blank">http://www.kuleuven.be/cwis/email_disclaimer.htm</a><br>
</blockquote></div><br>