2011/2/17 StormeHawke <span dir="ltr"><<a href="mailto:Brian.Trezise@intellidata.net">Brian.Trezise@intellidata.net</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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?</blockquote><div><br>Yes: because it is. --- keyset != keySet<br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
On 2/17/2011 1:31 AM, Wolfgang Laun-2 [via Drools - Java Rules
Engine] wrote:
</div><blockquote type="cite"><div class="im"> 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></div><div><div></div><div class="h5">
On 17 February 2011 00:37, StormeHawke <<a href="http://user/SendEmail.jtp?type=node&node=2516479&i=0&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
</div></div><div><div><div></div><div class="h5"><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 href="http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2514050.html?by-user=t&by-user=t" rel="nofollow" link="external" target="_blank">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></div></div>
> <a href="http://user/SendEmail.jtp?type=node&node=2516479&i=1&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im">
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>
</div></div>
<br>
_______________________________________________
<br>
rules-users mailing list
<br>
<a href="http://user/SendEmail.jtp?type=node&node=2516479&i=2&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im">
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
</div><hr color="#cccccc" noshade size="1">
<div style="color: rgb(68, 68, 68); font-family: tahoma,geneva,helvetica,arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div style="font-weight: bold;">If you reply to this email, your
message will be added to the discussion below:</div>
<a href="http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-Literal-error-tp2513857p2516479.html?by-user=t" rel="nofollow" link="external" target="_blank">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-family: tahoma,geneva,helvetica,arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; margin-top: 0.4em;">
To unsubscribe from Unterminated String Literal error, <a href="http://drools-java-rules-engine.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2513857&code=QnJpYW4uVHJlemlzZUBpbnRlbGxpZGF0YS5uZXR8MjUxMzg1N3wtMjA3MDc3MTQ0MA==&by-user=t" rel="nofollow" link="external" target="_blank">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-tp2513857p2519731.html" target="_blank">Re: Unterminated String Literal error</a><div><div></div>
<div class="h5"><br>
Sent from the <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html" target="_blank">Drools - User mailing list archive</a> at Nabble.com.<br>
</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>