[rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

Wolfgang Laun wolfgang.laun at gmail.com
Wed Feb 13 10:33:22 EST 2013


On 13/02/2013, pdario <dario.piantanida at gmail.com> wrote:
> I'm trying to understand this "Param" pattern, but I miss the Java calling
> for it: will I need to put the effective values in the Java code instead of
> the rule file?
>
> Can you elaborate a little about this?
>
> Take the Example 3 of your whitepaper: where are literals 0, 10 and "red"
> from the Example 2?

They are in one of several (many) Param facts.

Best practice would be to have an XML file defining all the Param
value sets, unmarshall it and insert after session creation.

Which means you have them neither in the Java code nor as "magic
numbers" in the rules. It makes you application and even your rules
independent from day-to-day change requests (which, we all know,
Marketing to enjoys ;-) )

-W

>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Evaluate-rules-for-multiple-facts-of-the-same-type-within-a-StateuflSession-tp4022157p4022280.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