You write a DRL function (or a Java static method) returning the
result of the if statement's condition, and call it.
-W
On 14/01/2014, wtang <wtang(a)kana.com> wrote:
I have the following code to set a Calendar object at Jan-1-2013 and
roll
it
3 days to 1-4-2013 and test to see if it is less then the current date.
This in all done inside the THEN part of a DRL rule
then
Calendar c = Calendar.getInstance();
c.set(2013, 1, 1);
c.roll(3, true);
if (c.getTime().before(new Date())) {
System.out.println("successfully rolled 3 days ahead");
}
How to you do this in the WHEN part of a DRL rule?
--
View this message in context:
http://drools.46999.n3.nabble.com/Can-When-part-of-DRL-contains-simple-lo...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users