[rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory inside the WorkItemHandler

Vijay K Pandey VPandey at mdes.ms.gov
Mon Nov 23 18:48:21 EST 2009


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 at lists.jboss.org [mailto:rules-users-bounces at 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 at 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 at lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091123/06bacc3b/attachment.html 


More information about the rules-users mailing list