[rules-users] Can't obtain object from a FactHandle
Wolfgang Laun
wolfgang.laun at gmail.com
Sat Mar 2 12:45:48 EST 2013
Given a
org.drools.event.rule.BeforeActivationFiredEvent,
method getActivation() returns a
org.drools.runtime.rule.Activation
and its method getFactHandles() is documented to return a List<FactHandle>.
It should be possible to retrieve the fact object using
session.getObject( factHandle ), and this succeeds in many instances,
but not reliably (5.5.0-Final).
Given facts of types One and Two a rule like
One( $list: listOFTwos )
Two(...) from $list
I find that Two facts, when matched via from, are not reported with
the proper fact handle, i.e., the one returned from the insert.
What's the point in reporting fact handles that can't be used to
retrieve a fact object?
If I want to obtain all facts that participate in an activation, is
method Activation.getObjects() more (and fully) reliable?
-W
More information about the rules-users
mailing list