<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
scratch that last question. I've got a cold this week, not thinking
straight lol<br>
<br>
On 2/17/2011 1:31 AM, Wolfgang Laun-2 [via Drools - Java Rules
Engine] wrote:
<blockquote
cite="mid:AANLkTiks+X0udYQNwygJ5fvQXOtrUVWt5Z_d-sPDdEWZ@mail.gmail.com"
type="cite"> There is a semicolon missing after break in line 39.
<br>
<br>
The drools.inse in the error message is very strange. Are you
<br>
compiling other rules as well?
<br>
<br>
Don't use dialect "mvel" when you aren't using mvel.
<br>
-W
<br>
<br>
On 17 February 2011 00:37, StormeHawke <<a
moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&node=2516479&i=0&by-user=t"
target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:
<div class="shrinkable-quote"><br>
>
<br>
>
<br>
> Esteban wrote:
<br>
>>
<br>
>> shouldn't that be: inputType.toString() //No capital i
??
<br>
>>
<br>
>
<br>
> Yes it should, thanks for catching that. Unfortunately
there must still be
<br>
> more problems because I'm still getting the error. I'm
thrown by the fact
<br>
> that it's telling me I've got an unterminated string
literal, it's not
<br>
> making sense:
<br>
>
<br>
>
<br>
> Error: Unable to build expression for 'consequence':
[Error: unterminated
<br>
> string literal]
<br>
> [Near : {... }
<br>
> };
<br>
>
<br>
> drools.inse ....}]
<br>
> ^
<br>
> [Line: 43, Column: 4] ' PriceResult result = new
<br>
> PriceResult($priceRequest.getClient(),
$priceRequest.getRequestedPn());
<br>
> for(InputType inputType :
$priceDataRecord.keyset())
<br>
> {
<br>
> String label =
inputType.getPropertyName();
<br>
> Object value =
$priceDataRecord.get(inputType);
<br>
> ValueType valueType = null;
<br>
> String valueDisplay = null;
<br>
> switch(inputType)
<br>
> {
<br>
> //Don't add ID and PN to the
result - ID is unnecessary and PN is
<br>
> included as a separate property
<br>
> case ID:
<br>
> case PN:
<br>
> break;
<br>
>
<br>
> case PACKAGE_UNIT:
<br>
> valueType =
ValueType.INTEGER;
<br>
> valueDisplay =
value.toString();
<br>
> break;
<br>
>
<br>
> case MOQ_1:
<br>
> case MOQ2:
<br>
> valueType =
ValueType.INTEGER;
<br>
> valueDisplay =
value.toString();
<br>
> break
<br>
>
<br>
> case PRICE_1:
<br>
> case PRICE_2:
<br>
> valueType =
ValueType.BIG_DECIMAL;
<br>
> valueDisplay =
value.toString();
<br>
> break;
<br>
>
<br>
> case LEAD_TIME:
<br>
> valueType =
ValueType.DOUBLE;
<br>
> valueDisplay =
value.toString();
<br>
> break;
<br>
>
<br>
> default:
<br>
> throw new
IllegalArgumentException("InputType " + inputType.toString()
<br>
> + " is not defined for " +
$priceRequest.getClient().getName());
<br>
> }
<br>
>
<br>
> if(valueType != null)
<br>
> {
<br>
> PriceValue priceValue = new
PriceValue(label, value, valueType,
<br>
> valueDisplay);
<br>
> result.put(label,
priceValue);
<br>
> }
<br>
> }
<br>
>
<br>
> insert(result);
<br>
> ' : [Rule name='someclient-default rule']
<br>
>
<br>
> --
<br>
> View this message in context: <a moz-do-not-send="true" href="http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2514050.html?by-user=t&by-user=t"
target="_top" rel="nofollow" link="external">http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2514050.html</a><br>
> Sent from the Drools - User mailing list archive at
Nabble.com.
<br>
> _______________________________________________
<br>
> rules-users mailing list
<br>
> <a moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&node=2516479&i=1&by-user=t"
target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>
</div>
<br>
_______________________________________________
<br>
rules-users mailing list
<br>
<a moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&node=2516479&i=2&by-user=t"
target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
<hr noshade="noshade" size="1" color="#cccccc">
<div style="color: rgb(68, 68, 68); font: 12px
tahoma,geneva,helvetica,arial,sans-serif;">
<div style="font-weight: bold;">If you reply to this email, your
message will be added to the discussion below:</div>
<a moz-do-not-send="true" href="http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2516479.html?by-user=t" target="_top" rel="nofollow" link="external">http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2516479.html</a>
</div>
<div style="color: rgb(102, 102, 102); font: 11px
tahoma,geneva,helvetica,arial,sans-serif; margin-top: 0.4em;">
To unsubscribe from Unterminated String Literal error, <a
moz-do-not-send="true" href="http://drools-java-rules-engine.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2513857&code=QnJpYW4uVHJlemlzZUBpbnRlbGxpZGF0YS5uZXR8MjUxMzg1N3wtMjA3MDc3MTQ0MA==&by-user=t" target="_top" rel="nofollow" link="external">click
here</a>. </div>
</blockquote>
<br><hr align="left" width="300">
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2519739.html">Re: Unterminated String Literal error</a><br>
Sent from the <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at Nabble.com.<br>