Thanks Kris. I hope this is the right way of getting hold of the WorkingMemory before we call the startProcess method on the session.

 

        StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );       

       

        CommandBasedStatefulKnowledgeSession sess = (CommandBasedStatefulKnowledgeSession)ksession;

       

  StatefulKnowledgeSessionImpl sessImpl =  (StatefulKnowledgeSessionImpl) ((KnowledgeCommandContext)    sess.getCommandService().getContext()).getStatefulKnowledgesession();

       

        WorkingMemory wm = sessImpl.session;

 

Vijay

 

-----Original Message-----
From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Sunday, November 22, 2009 8:29 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory inside the WorkItemHandler

 

No, not really.  But you can easily set / inject this working memory

when instantiating your work item handler, so you can use this reference

later.

 

Kris

 

Quoting Vijay K Pandey <VPandey@mdes.ms.gov>:

 

> Hi,

> 

> In Drools Flow (5.1) is there any way of getting hold of the

> org.drools.WorkingMemory inside the WorkItemHandler?

> 

> Thanks

> Vijay

> 

 

 

 

 

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

_______________________________________________

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users