Hi,
I am attempting to compile a rule template and expecting the resulting rules
to preserve the ordering of the template and of the rows in the CSV file.
However, it doesn't appear that ordering is preserved. Is this a bug, or is there a workaround?
I would like to rely on the implicit top-down salience by having rules in a specified order within the same file. (I'm aware that mutually exclusive rules are preferred, but this greatly complicates maintaining the rules for my use case, as does maintaining salience values.)
Using the (slightly-modified) cheese example, this template...
package org.drools.examples.templates;
global java.util.List list;
System.out.println("first rule");
rule "Cheese fans_@{row.rowNumber}"
Cheese(type == "@{type}")
System.out.print("last rule");
...results in the following output, where the first and last rule appear at the top followed
by the template rules in reverse row order. Any suggestions to achieve the desired order?
package org.drools.examples.templates;
global java.util.List list;
System.out.println("first rule");
System.out.print("last rule");
Person(age == Really old guy)
Cheers,
Patrick