[rules-users] Custom-Operator - No access to FactHandles?

Martin, Matthias martin at adesso.de
Fri Jun 10 05:54:15 EDT 2011


Hello,

some of our custom operators need to access already inserted facts at runtime. Therefore we extended org.drools.base.BaseEvaluator. The provide methods, i. e.
public boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor, Object object,  FieldValue value), state, amongst others, a parameter "workingMemory" of type org.drools.common.InternalWorkingMemory.
When calling workingMemory.getObjects() we receive a "UnsupportedOperationException". The question is whether it is possible to access facts in a KnwoledgeSession at runtime or not. Alternatively we could provide the objects in question as globals and call workingMemory.getGlobal(), but that seems to me like somewhat bad architecture.

Any suggestions are welcome.
Many thanks,
-Matthias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110610/270d5c32/attachment.html 


More information about the rules-users mailing list