[rules-dev] Get node's rule

Waleed Zedan wzedan at gmail.com
Mon Nov 10 02:12:51 EST 2008


Hi,

in AlphaNode.java (similarly beta nodes descendants)
public void assertObject(final InternalFactHandle handle,
                             final PropagationContext context,
                             final InternalWorkingMemory workingMemory)
throws FactException {
if ( this.constraint.isAllowed( handle.getObject(),
                                        workingMemory,
   ...
}
 // I need to put code here to get the rule and previous statisfied
conditions
}

I need to get rule that owns the alpha or beta node as well as all the
previous conditions that have been satisfied.

For example:
Rule 1 :
        Condition1 -> Node1
        Condition2 -> Node2
        Condition3 -> Node3

so if fact1 satisfies condition 1 & 2 only, but condition 3 doesn't satisfy
it, I need to store the information that rule 1 with condition 1 & condition
2 have been satisfied.

So , how can I get the rule that owns the condition?
Can I get this information from workingMemoryEventSupport.fireObjectInserted
event?

Thanks,
-- 
Waleed Zedan
SCJP 1.4 , CCNA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20081110/969998e3/attachment.html 


More information about the rules-dev mailing list