[rules-users] Does a drools fact have a handle?

Wolfgang Laun wolfgang.laun at gmail.com
Fri Feb 21 04:46:17 EST 2014


How would you distinguish your data if it isn't in Drools' Working Memory?

A fact handle is something your application should not use except as a
"handle" for retracting facts, if the need arises.

And then there is System::identityHashCode()...

-W


On 21/02/2014, Yoncho Yonchev <yoncho.yonchev at abv.bg> wrote:
> Hello, in order to distinguish my fact instances I need them to have some
> sort of number/id. Before implementing it I realized that the KieSession is
> not working with my business instance references,  but with FactHandles, so
> it occurs to me that there might be some standard id that is defined and
> populated by  the Drools in runtime.
>   So here is my question - Can a fact be identified by some sort of
> identifier after KieSession execution?  May be if we get the FactHandles
> from it, or if we use the KieBase for that?
>
>   Thanks in advance!
> Yoncho Yonchev.


More information about the rules-users mailing list