[rules-users] Can When part of DRL contains simple logics?

Wolfgang Laun wolfgang.laun at gmail.com
Tue Jan 14 00:15:42 EST 2014


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


More information about the rules-users mailing list