Thanks, killing mvel got it, the error messages are almost making sense now.  Any idea why it would tell me the method keyset() is undefined for an object that extends HashMap?

On 2/17/2011 1:31 AM, Wolfgang Laun-2 [via Drools - Java Rules Engine] wrote:
There is a semicolon missing after break in line 39.

The drools.inse in the error message is very strange. Are you
compiling other rules as well?

Don't use dialect "mvel" when you aren't using mvel.
-W

On 17 February 2011 00:37, StormeHawke <[hidden email]> wrote:

>
>
> Esteban wrote:
>>
>> shouldn't that be: inputType.toString() //No capital i ??
>>
>
> Yes it should, thanks for catching that.  Unfortunately there must still be
> more problems because I'm still getting the error.  I'm thrown by the fact
> that it's telling me I've got an unterminated string literal, it's not
> making sense:
>
>
> Error: Unable to build expression for 'consequence': [Error: unterminated
> string literal]
> [Near : {... }
>                };
>
>                drools.inse ....}]
>                  ^
> [Line: 43, Column: 4] '         PriceResult result = new
> PriceResult($priceRequest.getClient(), $priceRequest.getRequestedPn());
>                for(InputType inputType : $priceDataRecord.keyset())
>                {
>                        String label = inputType.getPropertyName();
>                        Object value = $priceDataRecord.get(inputType);
>                        ValueType valueType = null;
>                        String valueDisplay = null;
>                        switch(inputType)
>                        {
>                                //Don't add ID and PN to the result - ID is unnecessary and PN is
> included as a separate property
>                                case ID:
>                                case PN:
>                                        break;
>
>                                case PACKAGE_UNIT:
>                                        valueType = ValueType.INTEGER;
>                                        valueDisplay = value.toString();
>                                        break;
>
>                                case MOQ_1:
>                                case MOQ2:
>                                        valueType = ValueType.INTEGER;
>                                        valueDisplay = value.toString();
>                                        break
>
>                                case PRICE_1:
>                                case PRICE_2:
>                                        valueType = ValueType.BIG_DECIMAL;
>                                        valueDisplay = value.toString();
>                                        break;
>
>                                case LEAD_TIME:
>                                        valueType = ValueType.DOUBLE;
>                                        valueDisplay = value.toString();
>                                        break;
>
>                                default:
>                                        throw new IllegalArgumentException("InputType " + inputType.toString()
> + " is not defined for " + $priceRequest.getClient().getName());
>                        }
>
>                        if(valueType != null)
>                        {
>                                PriceValue priceValue = new PriceValue(label, value, valueType,
> valueDisplay);
>                                result.put(label, priceValue);
>                        }
>                }
>
>                insert(result);
> ' : [Rule name='someclient-default rule']
>
> --
> View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2514050.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>

_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users



If you reply to this email, your message will be added to the discussion below:
http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2516479.html
To unsubscribe from Unterminated String Literal error, click here.


View this message in context: Re: Unterminated String Literal error
Sent from the Drools - User mailing list archive at Nabble.com.