In general, don’t. There are very few situations where you need to explicitly cast anything in Rules DSL and when you try to do it yourself it often causes problems. The only time you need to and should mess with primitives is when you are calling something that requires a primitive (e.g. now.plusMinutes), in which case call .intValue on the Number. By default, Rules DSL will convert everything to a Number object for you. Let it.