Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5817

Cannot extract timestamp from ZonedDateTime in executable-model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.50.0.Final
    • 7.46.0.Final
    • executable model
    • None
    • 2021 Week 04-06 (from Jan 25)
    • 3
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

    Description

      exec-model fails to handle ZonedDateTime with the following rule.

      rule R when
        $t1 : TimestampedObject()
        $t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
      then
        list.add($t2.getName());
      end
      
      java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
      	at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
      	at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
      	at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
      	at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
      	at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
      	at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
      	at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
              ...
      

      This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA (DROOLS-5974). This JIRA addresses only the ZonedDateTime issue.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: