I am trying to determine precisely what class the rules engine (kie version
6) thinks the class is that was inserted. The situation is that I am
inserting objects from JRuby.
1. If I pass the object to a Java program and do reflection, the class is
shown to be RubyObject (i.e., "getClass().getName".
2. I did create a rule that fires on any RubyObject that is inserted but
it never fires:
import org.jruby.RubyObject;
rule "Find any RubyObject"
dialect "mvel"
when
RubyObject()
then
System.out.println("We found a RubyObject!");
end
3. When I insert an object from JRuby that is called "Message", there is
what I see:
[ObjectInsertedEventImpl: getFactHandle()=[fact
0:1:529888082:529888082:1:DEFAULT:NON_TRAIT:#<Message:0x1f957352>],
getObject()=#<Message:0x1f957352>,
getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl@5719510f,
getPropagationContext()=PhreakPropagationContext
[entryPoint=EntryPoint::DEFAULT, factHandle=[fact
0:1:529888082:529888082:1:DEFAULT:NON_TRAIT:#<Message:0x1f957352>],
leftTuple=null, originOffset=-1, propagationNumber=2, rule=null, type=0]]
How can find out exactly what are the facts in working memory and determine
the precise nature of the fact I inserted?
Ray Hooker
--
View this message in context:
http://drools.46999.n3.nabble.com/What-Class-is-the-Fact-that-was-inserte...
Sent from the Drools: User forum mailing list archive at
Nabble.com.