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

Rajeswari rajeswari at raremile.com
Wed Jul 2 06:22:17 EDT 2014


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.


More information about the rules-users mailing list