Mike,

   Is the numeric value, the character code?
   I mean you have 65 == 'A', or something?

   I fixed today a few conversions between chars, numbers and strings... you may want to try trunk and report back your results...

   http://jira.jboss.com/jira/browse/JBRULES-261

   []s
   Edson

2007/7/6, Mike D < mike.dalaker@kewill.com>:

Good morning.  I'm new to Drools and need a little assistance on how to
compare a string to a numeric.

Example:

ShipmentHeader transMode is a numeric, while the TransMode is a character.
(We have a legacy system which we can't change... for now).  Is there an
easy way to do it w/o having to run an eval?


rule "00310 Fail"
        when
                #conditions
                $status : SendToCustomsStatus()
                exists ValidationReference(validationNo == 310)
                exists ValidationControl(validationNo == 310)
                exists ShipmentHeader(portLading == 0,$transMode : transMode)
                TransMode(transMode == $transMode, portLadingRequired == "Y")
        then
                #actions
                $status.fail(310);
end


Thanks,
Mike
--
View this message in context: http://www.nabble.com/toString-tf4029720.html#a11446453
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com