[rules-users] Guvnor - Loading enums programatically using rule metadata

Michael Anstis michael.anstis at gmail.com
Wed Oct 12 14:03:40 EDT 2011


I thought I had already replied, but...... anyway, why not have one rule
create new facts containing the necessary rule attributes in their RHS that
are inserted into WM. Your other rules could then use these facts' fields
for the Enum loader...

sent on the move

On 12 Oct 2011 18:22, <GPatel at tsys.com> wrote:

> I suppose I can use the standaloneEditor, add my data loader arguments to
> the URL, have a filter on the serverside set up a thread-local context that
> contains the arguments and have the data loaders use that context.
>
> How do I disable enum caching so that the above approach works?
>
>
>
>
>
> From:        Ghanshyam Patel/Tempe/TotalSystem
> To:        rules-users at lists.jboss.org
> Date:        10/11/2011 05:05 PM
> Subject:        Re: Guvnor - Loading enums programatically using rule
> metadata
> ------------------------------
>
>
> I realize that "drools" is a runtime variable, available only during rule
> execution, but the question still stands. Is it possible to somehow pass in
> rule attributes as arguments to Data loaders for enums?
>
> Any help would be appreciated
>
> Thanks
> G. Patel
>
>
>
>
> From:        Ghanshyam Patel/Tempe/TotalSystem
> To:        rules-users at lists.jboss.org
> Date:        10/10/2011 03:35 PM
> Subject:        Guvnor - Loading enums programatically using rule metadata
> ------------------------------
>
>
> The Guvnor manual specifies how to load enum data programtically but it
> seems like only other fields on the same Fact can be used to filter the
> values that can show up in the drop-down fields, as shown below:
>
> 'Fact.field[dependentField1, dependentField2]' : '(new
> com.yourco.DataHelper()).getListOfAges("@{dependentField1}",
> "@{dependentField2}")'
>
> Is it possible to somehow use other rule attributes, like package name or
> rule metadata to filter the list? Something like the following:
>
> 'Fact.field[dependentField1]' : '(new
> com.yourco.DataHelper()).getListOfAges("@{dependentField1}",
> drools.getRule().getMetaData().get("ID"))'
>
> Thanks
> G. Patel
> ----------------------------------------- The information contained in this
> communication (including any attachments hereto) is confidential and is
> intended solely for the personal and confidential use of the individual or
> entity to whom it is addressed. If the reader of this message is not the
> intended recipient or an agent responsible for delivering it to the intended
> recipient, you are hereby notified that you have received this communication
> in error and that any review, dissemination, copying, or unauthorized use of
> this information, or the taking of any action in reliance on the contents of
> this information is strictly prohibited. If you have received this
> communication in error, please notify us immediately by e-mail, and delete
> the original message. Thank you
> _______________________________________________
> 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/20111012/b082722e/attachment.html 


More information about the rules-users mailing list