Drools- how to find out which all rules were matched?

后端 未结 5 1615
后悔当初
后悔当初 2021-02-02 13:32

I\'ve one .DRL file which has say 10 rules. Once I insert a fact, some rules may be matched- how do I find out which rules were matched programmatically?

5条回答
  •  臣服心动
    2021-02-02 13:45

    You can print info about rule executed from DRL file itself using RuleContext:drools

    System.out.println(drools.getRule().getName())
    

提交回复
热议问题