You can load the "Configuration" fact from your calling program ( depending upon
the state you are firing the rule for. ) This can be done using database/property file.
Then insert this fact into working memory and then insert rest of the facts that you are
already doing.
This way you'll be able to re-use same ruleset and state-specific configuration fact
object.
-abhay
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of marunam
Sent: Wednesday, May 25, 2011 4:05 AM
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] drools dynamic LHS
Thank you all for your response
The reason why I need this is, the rules are for different states and the
fact values could differ among states(insurance application).
We probably don't want to duplicate rules for different states by writing
separate drl file(just changing the fact value....age in our example) for
each state
What I was thinking was, creating fact object dynamically with its
attributes being loaded from some properties file dynamically??
Any other solution/suggestions?
Thanks
--
View this message in context:
http://drools.46999.n3.nabble.com/drools-dynamic-LHS-tp2980536p2982029.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users