[rules-users] How to get handle to stateful session in rule RHS ?

Wolfgang Laun wolfgang.laun at gmail.com
Tue Sep 13 10:24:11 EDT 2011


Subsection "The Right Hand Side (then)" of the Expert manual explains
some details about the implicit variables. E.g.:

   kcontext.getKnowledgeRuntime()

-W


On 13 September 2011 16:16, eskomk <esko.hujanen at ebsolut.fi> wrote:
>
> Hi all,
>
> I need to retract events from StatefulKnowledgeSession in rule's
> consequences section.
> How do I get a handle to the session in rule's RHS ?
>
> When I get this session handle I will try to use its retract method:
> void retract(FactHandle handle)
> (which is derived from WorkingMemoryEntryPoint interface)
>
> to remove the event which caused the rule to fire.
>
> thanks, Esko
> --------------
> Esko Hujanen
> http://www.ebsolut.fi
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/How-to-get-handle-to-stateful-session-in-rule-RHS-tp3332730p3332730.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users



More information about the rules-users mailing list