Hello, I am new to JBoss Rules, so this might be an obvious question. I am
generating Java objects from xsd's using jaxb/xjc. These objects are used as
facts in the working memory. Some of the fields in these objects need to be
times; however, jaxb likes to convert xs:time types to XMLGregorianCalendar
in the Java object. When I try to use such a field as a restriction, e.g.
timeA <= timeB, an exception is thrown because the XMLGregorianCalendarImpl
cannot be cast to a Comparable.

Am I doing something particularly stupid, or is there a way around this?

My workaround is to write a function in my rules file that compares to
XMLGregorianCalendar objects and eval it. But it would be nice to be able to
use XMLGregorianCalendars as restrictors in a rule.

Thanks,
Justine

Reply via email to