[rules-users] Usage of java.util.List in Drools Guvnor 5.5.0

Michael Anstis michael.anstis at gmail.com
Wed Jul 2 06:35:10 EDT 2014


Do you insert a List into working memory?


On 2 July 2014 11:22, Rajeswari <rajeswari at raremile.com> wrote:

> Created a Model in Guvnor 5.5.0 with 3 fields - 2 Text, 1 java.util.List
> The model is verified and validated - correctly.
> Source looks like below
> declare FormatConfig
>             fieldName: String
>             regEx: String
>             regExPatterns: java.util.List
> end
>
> While trying to create a Business Rule using the above created Model. The
> rule gets fired and works fine.
> rule "MyFormat"
>     dialect "mvel"
>             when
>         config : FormatConfig( fieldName == "AMOUNT" )
>     then
>         config.setRegEx( "123" );
>          retract( config );
> end
>
> But, the moment I try to use the List, by only declaring a List in the
> "When" section, the rule stops working.
> rule "MyFormat"
>     dialect "mvel"
>             when
>         config : FormatConfig( fieldName == "AMOUNT" )
> regExPatterns1: java.util.List ( )
>     then
>         config.setRegEx( "123" );
>          retract( config );
> end
>
> My final intention is to modify the regExPatterns list in the "THEN" block
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Usage-of-java-util-List-in-Drools-Guvnor-5-5-0-tp4030217.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/20140702/738e4840/attachment.html 


More information about the rules-users mailing list