This design would get my vote, especially if the rules for each state diverge even
slightly. The thing is, this kind of divergence can become a nightmare over time if you
design too tightly to any initial requirements. The initial divergence always increases.
:) One main selling point for rule based systems is that they're supposed to scale to
higher complexities. They can if your design allows for it.
Also, there's no reason that several states couldn't share the "facts per
state" rules if their rules were identical.
--- On Tue, 5/24/11, Ansgar Konermann <ansgar.konermann(a)googlemail.com> wrote:
From: Ansgar Konermann <ansgar.konermann(a)googlemail.com>
Subject: Re: [rules-users] drools dynamic LHS
To: rules-users(a)lists.jboss.org
Date: Tuesday, May 24, 2011, 6:28 PM
Am 25.05.2011 00:34, schrieb
marunam:
> What I was thinking was, creating fact object
dynamically with its
> attributes being loaded from some properties file
dynamically??
>
> Any other solution/suggestions?
Create pre-compiled rule packages: one for each state and
one for the
generic rules, and merge the latter with one of the "facts
per state"
when preparing the knowledge base.
Works well for our use case (multiple customers), should do
equally well
for a number of states.
Best regards
Ansgar
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users