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

Unary negation fails with TemporalPredicate in executable-model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.70.0.Final
    • 7.69.0.Final
    • executable model
    • None
    • 2022 Week 17-19 (from Apr 25), 2022 Week 20-22 (from May 16)
    • 2
    • NEW
    • NEW
    • ---
    • ---

      Negation '!' with a temporal constraint

        $b : StockTick( company == "ACME", !(this after[5s,8s] $a ))
      

      fails to compile with exec-model

      The operator ! is undefined for the argument type(s) TemporalPredicate
      
      public enum LambdaPredicate06CF0CA6DE04D1B154AD6F3FF00EF219 implements org.drools.model.functions.Predicate2<org.drools.modelcompiler.domain.StockTick, org.drools.modelcompiler.domain.StockTick>, org.drools.model.functions.HashedExpression {
      
          ...
          @Override()
          public boolean test(org.drools.modelcompiler.domain.StockTick _this, org.drools.modelcompiler.domain.StockTick $a) throws java.lang.Exception {
              return !(D.after(5L, java.util.concurrent.TimeUnit.SECONDS, 8L, java.util.concurrent.TimeUnit.SECONDS));
          }
      

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

                Created:
                Updated:
                Resolved: