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 <[email protected]> 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-logics-tp4027677.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
