Hi guys,
I'm looking to do the following and I was wondering how to use Date objects in Drools. This is what I currently have:
rule "Difference between end and start time is less than a very small (threshold) value."
salience 100
when
obs: ObsClass((endTime - startTime) < someVerySmallValue)
then
System.out.println("Difference between end and start time is less than a very small (threshold) value.");
End
rule "Check if user defined time frame falls between startTime and endTime variables"
salience 100
when
obs: ObsClass((endTime - userDefinedTime) > 0 && (userDefinedTime - startTime) > 0)
then
System.out.println("Check if user defined time frame falls between startTime and endTime variables")
end