Hi all,<br><br>I'm new to Drools, and wonder how I can most cleanly write down rules for the following.<br><br>(For the sake of example) Say I have an object that needs to be processed season-dependent. I basically need a rule like:<br>
rule<br> when<br> Date( month == X, day >= Y, day <= Z)<br> // Some date containing object<br> then<br> System.out.println("Season is "+R)<br> // Store season in associated object<br>
end<br><br>And fill in X, Y, Z and R with: <br clear="all">X Y Z R<br>1 1 31 Winter<br>2 1 29 Winter<br>3 1 21 Winter<br>3 22 31 Spring<br>4 1 30 Spring<br>5 1 31 Spring<br>
6 1 21 Spring<br>6 22 30 Summer<br>7 1 31 Summer<br>...<br><br><br>Should I expand all this rules by hand, and define 16 rules in my rule file? Or can I parametrize the rules and have this done automagically?<br>
<br>Thanks a lot,<br><br>Tim van Heugten<br>