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 <Brian.Trezise(a)intellidata.net> 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-L...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users