[rules-users] How to use type-safe enums in rule condition
Wolfgang Laun
wolfgang.laun at gmail.com
Wed Nov 13 08:40:11 EST 2013
Just curiosity.
On 13/11/2013, Steven Williams <stevearoonie at gmail.com> wrote:
> I use something like the following in rules to good effect:
>
> Country( this == Country.USA )
Granted, you can add any number of attributes to an enum so that it's
just another way of writing a static set of bean objects. But is there
a "good effect" to be had from a pattern that merely ascertains the
presence of an enum instance
in the Working Memory?
Other than this, a pattern like
City( country == Country.USA )
doesn't require the insertion of the Country enums.
Cheers
Wolfgang
More information about the rules-users
mailing list