1

I am trying to use the Drools Fusion temporal operators before, after, and coincides but I keep getting the error:

Conversion to long not supported from java.time.ZonedDateTime

In my objects, the times I am comparing are ZonedDateTime. Does Drools require time variables be a specific type? What does the error mean by conversion to long?

I have tried using .isBefore() and .isAfter() but it seems Drools does not recognize these functions.

  • Drools is happy if it can compare long values resulting from java.util.getTime(). You might have to add a getter to your fact class returning that, converted from the ZonedDateTime. – laune Jan 25 '17 at 18:33

1 Answers1

1

From Drools version 7.0.0.Beta8 it is possible to use CEP temporal operators using also java.time.ZonedDateTime, along with broader java.time support.

You can find more details about temporal operators to support for java.time classes here: DROOLS-1490, until the v7 Final release will come out with documentation release notes.

tarilabs
  • 2,178
  • 2
  • 15
  • 23