[rules-users] Creating template column in guvnor for attribute value?

Michael Anstis michael.anstis at gmail.com
Wed Aug 15 05:11:42 EDT 2012


Hi,

This is somewhere between a bug and an enhancement:

Currently the Template Editor does not support template keys for Metadata
or Attributes; i.e. your requirement is an enhancement.

You can however provide literal values formatted as template keys (e.g.
@{xx} as you have discovered); i.e. there is a bug.

The enhancement has already been reported here:
https://issues.jboss.org/browse/GUVNOR-1907

Please note, with 5.4 you can use a web-guided Decision Table.

These support BRL fragments for columns (i.e. you can define a column that
uses any feature in the BRL\Guided Rule Editor or Template Editor) and they
already support interpolation of values for both Meta-data and Attributes.

With kind regards,

Mike

On 13 August 2012 18:38, dunnlow <dunnlow at yahoo.com> wrote:

> I'm using Guvnor 5.4
>
> I find myself sometimes wanting to use templates to map a string to a
> metadata value or timer.  For example, based upon a name, set a value for
> the timeout.  As far as I can tell however, the only way to create a
> template column in guvnor is to include the column identifier in the LHS.
>
> For example, I have a basic rule template that checks a name (there is only
> a "name" column in the template matrix).  Then, I click on options, add a
> timer and give it a value of "@{timeout}" I get an error - the timeout
> column does not exist in the template.  However, if I write a dummy
> expression on the LHS like "foo" not matches timeout, the timeout column is
> created and everything is great once I set the value.  If I delete the
> predicate that uses timeout, I get an error again for the timer attribute.
>
> This gets really ugly because I end up having (seemingly) useless
> predicates.  Is there a clean way to support this functionality?
>
> Thanks,
> -J
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Creating-template-column-in-guvnor-for-attribute-value-tp4019108.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/20120815/68741b30/attachment.html 


More information about the rules-users mailing list