title: Get all the conditions which resulted in rule execution
body: <p>I want to get all the individual conditions which resulted in the execution of a rule.</p>
  
  <p>For example, if I have the following rule:  </p>
  
  <pre><code>package app1;
  
  rule 'rule1'
  when
      MyObjectType1( booleanPredicate1() )
      or
      (
        MyObjectType2( booleanPredicate2() )
        and
        MyObjectType3( booleanPredicate3() )
      )
      or
      MyObjectType4( booleanPredicate4() )
  then
      System.out.println("In rule - " + drools.getRule().getName());
  end
  </code></pre>
  
  <p>and <code>booleanPredicate1()</code>, <code>booleanPredicate2()</code> and <code>booleanPredicate4()</code> are <em><code>true</code></em>, then I want to get the following output:  </p>
  
  <ul>
  <li><em><code>booleanPredicate1() resulted in rule execution.</code></em></li>
  <li><em><code>booleanPredicate4() resulted in rule execution.</code></em></li>
  </ul>
  
  <p>What I've tried so far is inside the implementation of all such predicate methods, I've added a logging statement which gets executed only when that method is going to return <em><code>true</code></em>:  </p>
  
  <pre><code>boolean booleanPredicate1()
  {
    boolean ret = false;
    ...
    ...
    if (&lt;business-logic-defined-predicate&gt;)
    {
      ret = true;
    }
    if(ret)
    {
      addToLog("booleanPredicate1 became true.");
    }
    return ret;
  }
  </code></pre>
  
  <p>but with this solution, I'll also get the output <em><code>booleanPredicate2() resulted in rule execution.</code></em> which is wrong.  </p>
  
  <p>Is there any way with which I can get the correct logging results?</p>