conquer66666
conquer66666

Reputation: 69

Drools- how to get the facts which trigered the rule?

I have a lot of events log insert to ksession, and I need to find out the facts which trigered the specific rule.How can i get the relation ship between the facts which trigered the rule and the events log?

Upvotes: 1

Views: 166

Answers (1)

Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20956

You can use drools keyword

import java.util.Arrays;

rule
when
    ...
then
    System.out.println(Arrays.asList(drools.getTuple().toObjects()));
    ...
end

Upvotes: 1

Related Questions