[rules-users] 6.0.1.F Enumeration Reloading Weirdness

Michael Anstis michael.anstis at gmail.com
Thu Mar 13 04:02:50 EDT 2014


We assume, even when a helper function is used, that the list is static.

If you want to force server-side invocation of your helper function to
refresh the list you need to include a parameter in the definition. This
signals the list is dynamic and should be refreshed using the helper
function.

See "16.10.1. Advanced enumeration concepts" in the User Guide:


"In the above cases, the values in the lists are calculated up front. This
is fine for relatively static data, or small amounts of data. Imagine a
scenario where you have lists of countries, each country has a list of
states, each state has a list of localities, each locality has a list of
streets and so on... You can see how this is a lot of data, and it can not
be loaded up. The lists should be loaded dependent on what country was
selected etc..."


With kind regards,


Mike




On 6 March 2014 15:52, SrjTx <clickthex at yahoo.com> wrote:

> I have an enum along the lines of
>
> Bean.x : (new com.xyz.MyClass()).getNames()
>
> Which works fine and getNames() is called when JBoss first starts up and
> the
> first time that a rule using this enum is created.
>
> But, getNames() is never called again.  Either when a new rule is created
> or
> if you do the close/reopen the editor thing.  Which means that the enum
> gets
> out of date with the DB it is pulling from.
>
> I did find a work-around, if you also edit the .enumeration file, I just
> add
> a blank entry at the bottom of table - then getNames() is called with a new
> rule is created of you do the close/reopen the editor thing.
>
> Is there a fix in head for this?
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/6-0-1-F-Enumeration-Reloading-Weirdness-tp4028568.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/20140313/91221dcb/attachment.html 


More information about the rules-users mailing list