[rules-users] drools dynamic LHS

Leonardo Gomes leonardo.f.gomes at gmail.com
Tue May 24 19:43:16 EDT 2011


The Context fact I mentioned would be populated with values coming from a DB
or properties file. At runtime you can read the right properties file,
create a "Context" object and feed the working memory with it plus all the
other regular facts you already have. With this you achieve the
parametrization you're looking for, and there's no need to change code for
that.

Another approach is the one described by Ansgar with different DRLs. Both
would work, you just need to make up your mind :)

On Tue, May 24, 2011 at 9:17 PM, marunam <sutavis at gmail.com> wrote:

> I understand that fact could store the values but my question more towards
> how to design this for dynamic number of facts. Let's say, if the business
> want to modify the rules with more fact values, I want to be able to happen
> this dynamically rather than changing the code for fact values and adding
> it
> there.
>
> I was thinking more toward having a property file(database??) and program
> reads those dynamic values and prepares fact model before running the rules
>
> Thoughts??
>
> Thanks
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/drools-dynamic-LHS-tp2980536p2981145.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110525/d3ad0b6e/attachment.html 


More information about the rules-users mailing list