[rules-users] drools-expert: Log atomic assertions !?

bholzer holzer at itemis.de
Thu Dec 20 06:43:11 EST 2012


Is wonder how to log atomic assertions (i.e. the results of the Rete-Nodes -
visits ) ?
I tried the three Debug*EventListeners, but they're too coarse-grained.

As a workaround, I patched org.drools.reteoo.AlphaNode.assertObject(...) as
follows:

public void assertObject(...) {
        final AlphaMemory memory = (AlphaMemory)
workingMemory.getNodeMemory( this );
        boolean allowed = this.constraint.isAllowed(factHandle,
workingMemory, memory.context );
        *log("Eval of " +  this.constraint + " on " + factHandle.getObject()
+ ":" + allowed);*
        if ( allowed ) {	
            this.sink.propagateAssertObject(factHandle, context,
workingMemory);
        }
    }

Is there a better way to archieve my goal ?



--
View this message in context: http://drools.46999.n3.nabble.com/drools-expert-Log-atomic-assertions-tp4021264.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list