David Boaz wrote:
Hi all,

Is it possible to determine the Pattern that ‘produced’ a given Fact? For
example, assuming we have the following rule and event handler:

rule r1
when p1:Person(...)
                p2:Person(...)
        then
        ...
end

protected class MyAgendaEventHandler extends
            DefaultAgendaEventListener {

        @Override
        public void
afterActivationFired(org.drools.event.rule.AfterActivationFiredEvent event)
{
                String ruleName = event.getActivation().getRule().getName();
                KnowledgeRuntime knowledgeRuntime = event.getKnowledgeRuntime();
                for (FactHandle factHandle : 
event.getActivation().getFactHandles()) {
                        Object fact = knowledgeRuntime.getObject(factHandle);
                        Pattern pattern= ?;
                }
        }
}

Is it possible to determine the Pattern that originate a Person object? If
yes, how the pattern is identified?
no
Thanks, David


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to