I am using the drools 5.4 Integration Server (with Guvnor).
I have two instances of the Integration Server and (ideally) one instance of
the rules in Guvnor. I would like to create some rules that depend on the
instance of the Integration Server on which they are running. The vision is
that I would set a global variable somewhere that provided the server name
then use that variable in my rules.
I thought about adding a global variable via guvnor package configuration,
but I can only declare it (not set it). Also, if I could do that, I would
need another knowledge base, which I am trying to avoid.
I am considering setting up a declared object (so that the rule just fires
once) and a rule that if the object doesnt exist, creates it and calls a
function that checks a System Property and sets the value (I know, I've read
not to set globals in rules). If this rule has a high salience, this seems
like it could work - but is REALLY ugly.
Is there a better way?
Basically, I think I want to inject that value into the knowledge session
via Spring.
Thanks for any thoughts,
-J
--
View this message in context:
http://drools.46999.n3.nabble.com/Insert-global-into-working-memory-via-S...
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