I tried this approach, but I get compilation errors for tokens '-' and
get similar errors for any arithmetic symbols (*, + or -)
What is the right way to add or subtract or multiply with in "when"
I don't know why the example doesn't work. Try this:
rule "ITR Discard"
req : LowFareRequest(
$reqTime : requestedDeparture.time)
itr : AirItinerary( discarded == false )
flight : Flight(
($reqTime / 3600000 + 2),
($reqTime / 3600000 - 4))