[
http://jira.jboss.com/jira/browse/JBRULES-1078?page=comments#action_12371858 ]
Mark Proctor commented on JBRULES-1078:
---------------------------------------
4.0 will already compare BigDecimals for you, it will always attempt to coerce the values
into appropriate formats. The comparison you are trying to do will need to use a return
value field constraint, just wrpa it in paranthesis pair of brackets.
Object(toString == ( String.valueOf("196071") ) )
Allow static expressions in value restrictions
----------------------------------------------
Key: JBRULES-1078
URL:
http://jira.jboss.com/jira/browse/JBRULES-1078
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Alexandre Gattiker
Assigned To: Mark Proctor
Would it be possible to allow the following two rules to work? In 4.0.0.GA, I get parsing
errors for both.
rule "sample rule 1"
when
Object(toString == String.valueOf("196071"))
then
System.out.println("ok");
end
rule "sample rule 2"
when
Object(toString == new String("196071"))
then
System.out.println("ok");
end
(In my particular case, I need to compare BigDecimal values).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira