Drools Data Table to Drl File conversion - Empty Condition Column
<pre><code>// rule values at C12, header at C7
rule "CalcInterest_12"
    salience 65524
    activation-group "all"
    when
        a:DroolsInput(RuleActivationFreezeDate &gt; "15-Feb-2016")
        f:DroolsOutput()        
    then
        f.setCommission((a.getAmount() * 0.035 &gt; 7500.00) ? 7500.00 :     a.getAmount() * 0.035);           
end
</code></pre>

<p><a href="https://i.stack.imgur.com/OoWLk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OoWLk.png" alt="Drools Datatable"></a></p>

<p>My requirement is to have two sets of variables which will reference to two different Java objects. One will be referenced in condition column to refer to the input values and the other will be referenced in action column which will set values to the object once the rules are run.</p>

<p>Shown above is Drl File generated from Data Table (Drools 6.3 Version - Non Guvnor), the only line I have to add manually was f:FinancialProjection. In another stackoverflow post, it was marked that variables can only be referenced from the condition column and hence was asked to created an empty condition column which will hold reference to an object (Java) which will be used in Action for setting values once the rule is run against the fact. However, when I ran the excel file through Excel to Drl conversion, the empty condition column translation did not happen. Please let me know if you could provide any pointers to the same.</p>

<p>EDIT:
@laune - Based on your suggestions, I have gotten two things to work -
a. Add a dummy condition column check which also became variable declaration, that can be referenced on the ACTION column. (f:DroolsOuput price > 0.00 is the dummy check added in the below spreadsheet)
b. Declare a local variable, that is again referenced in a different action to compute actual value that is to be set to Java POJO. (Declared a local variable feePercent that is referenced in other rules)</p>

<p>The working data-table is copied below for others to reference.
<a href="https://i.stack.imgur.com/zwhuU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zwhuU.png" alt="Drools Dummy Column"></a></p>