title: Drools if and else based on condition from another rule
body: <p>I want to run a rule that calls Java method and passes the fact (or rather, its logical value) from another rule, although I don't know if the java methods are at all important for this problem. It's not easy to describe so I'll try to show it based on an example:</p>
  
  <pre><code>rule "Some rule determining fact"
  
      when
          ... //some conditions
      then
          insert(new SomeCondition(callSomeJavaMethodReturningBoolean()))
      end
  
  rule "Some rule using SomeCondition"
  
      when
          SomeCondition($value: value)
          ... //some other conditions
      then
          insert(callJavaMethodUsingSomeCondition($value))
      end
  </code></pre>
  
  <p>The problem here is that the first rule doesn't always fire, so <code>SomeCondition</code> is not always definded and second rule isn't evaluated.</p>
  
  <p>My second try was to create two separate rules like this:</p>
  
  <pre><code>rule "Some rule determining fact"
  
      when
          ... //some conditions
      then
          insert(new SomeCondition(callSomeJavaMethodReturningBoolean()))
      end
  
  rule "SomeConditionTrueRule"
  
      when
          SomeCondition(value == true)
          ... //some other conditions
      then
          insert(callJavaMethodUsingSomeCondition(true))
      end
  
  rule "SomeConditionFalseRule"
  
      when
          not SomeCondition() or SomeCondition(value == false)
          ... //some other conditions
      then
          insert(callJavaMethodUsingSomeCondition(false))
      end
  </code></pre>
  
  <p>This doesn't work as intended either, because it first evaluates <code>SomeConditionFalseRule</code> before even evaluating my first rule. I'll appreciate any suggestions on how to solve this problem. Drools version used is <code>6.5.0</code> if that matters. Also, I want to avoid using <code>salience</code> if possible since I've read it is a bad practice (correct me if I'm wrong).</p>