Are you sure that timediff is doing the correct thing?
Can you post the code of MyFact and timediff?
--- Miguel Figueiredo <mfigueiredo(a)telbit.pt> wrote:
Hi listers,
I have a fact MyFact that has a Date field in it,
and I want to check if the
difference between this date and the current date is
greater than 10 seconds:
The function timediff() returns the difference in
seconds between a date and
the current date.
Rule:
rule myRule
when
fact : MyFact(date : fact, eval(timediff(date) >
10));
then
System.out.println("Greater than 10 seconds");
end
When I fire the rules, and the difference is less
than 10 seconds nothing
happens. The next time that I fire the rules and the
difference is greater
than 10 seconds nothing happens as well.
How can I make this work?
Best regards,
Miguel
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users