[rules-users] Fusion temporal operators, time units

Wolfgang Laun wolfgang.laun at gmail.com
Tue Nov 16 14:37:21 EST 2010


You may have to define your own version of temporal operators or at least
to replace the parser for the temporal operators' parameters, i.e., what is
written between the brackets.

I guess that in your domain, a month is not an absolute interval but depends
on the starting point. This makes it more difficult if you intend to use
a temporal relation based on arbitrary starting points. In this case, even
a full redefinition of (some of) the temporal operators might be
necessary, where
distances off some point in time depend on that point in time. Can you
provide a consistent definition, at least for those temporal operators you
intend to use? The definitions in Drools Fusion are complete; see what you
would need to have with months (and years) in their parameters.

-W


2010/11/16 Nathan Bell <Nathan.Bell at pharmacyonesource.com>:
> Fusion seems to only support days, hours, minutes, seconds and milliseconds
> for the units of time used with temporal operators. For example consider the
> following rule (which works correctly):
>
>
>
> rule "AdmittedInLast7Days"
>
> dialect "java"
>
> when
>
>       $now : RuleTime()
>
>       $account : PatientAccount(this after[-7d,0s] $now )
>
> then
>
>       System.out.println("AdmittedInLast7Days fired");
>
> End
>
>
>
> Now suppose that I want an alternate version of this rule that instead of
> firing for patients admitted in the last 7 days it fires for patients
> admitted in the last 7 months, or years. Is there built-in support for doing
> this? If not, does anyone have suggestions on the best way to approach this?
>
>
>
> Thank You,
>
> Nathan Bell
>
>
>
> _______________________________________________
> 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