title: How to fill condition for Object in Drools rule template with @{variablePart}?
body: <p>I have a rule template (non-decision table based) with a condition (aka constraint) for an object. This condition should be filled based on the variables/parameters set for this rule template when compiling it via Drools' Object Compiler. The example below shows what I'm trying to do - but sadly this is not compiling. The error messages are not explaining and subsequent null pointer exceptions are the consequence.</p>
  
  <pre><code>rule "variable condition"
  when
      Person ( @{condition} )
  then
      // do something...
  end
  </code></pre>
  
  <p>On java side the variable part is then passed to the Drools Object Compiler similar to this:</p>
  
  <pre><code>String condition = "id == 42";
  String compiledRule = objectDataCompiler.compile(data, ...
  </code></pre>
  
  <p>Or similar to the next example, showing a conditional operator connecting several acceptable values:</p>
  
  <pre><code>String condition = "(id == 42) || (id == 52)";
  String compiledRule = objectDataCompiler.compile(data, ...
  </code></pre>
  
  <p>Even with the first example for the java-side code the rule template would not compile.</p>
  
  <p>How can one setup a working templated rule for achieving such variable conditions?</p>