I wanted to write a rule for 2 consecutive matches like this:
Match($day : day);
Match(day.index == $day.index + 1);
or like this:
Match($day : day);
Match(day.getIndex() == $day.getIndex() + 1);
But I had to write it like this:
Match($day1 : day);
Match($day2 : day -> ($day2.getIndex() == $day1.getIndex() + 1));
So I was wondering if there is any non-solvable reason
why drools can't compile
Match(day.getIndex() == $day.getIndex() + 1);
into an implicit predicate with an anonymous variable, like this:
Match($anonymous : day -> ($anonymous.getIndex() == $day.getIndex() +
1));
It would make reading the rules a lot more easier :)
The first time I read the drools manual, I just didn't understand
predicates.
If any of the developers agree, I 'll happily make another jira with
testcase patch.
--
With kind regards,
Geoffrey De Smet
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email