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

MvelParser issue for binding variable inside parentheses

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • None
    • None
    • executable model
    • None
    • 2021 Week 16-18 (from Apr 19), 2021 Week 19-21 (from May 10)
    • 4
    • NEW
    • NEW

    Description

      MvelParser issue for binding variable inside parentheses

      ( ($n : name == "Mark") )
      

      fails with

      com.github.javaparser.ParseProblemException: Encountered unexpected token: ":" ":"
          at line 1, column 5.
      
      Was expecting one of:
      
          "!="
          "%"
          "%="
          "&"
          ...
      
      Problem stacktrace : 
        org.drools.mvel.parser.GeneratedMvelParser.generateParseException(GeneratedMvelParser.java:12177)
        org.drools.mvel.parser.GeneratedMvelParser.jj_consume_token(GeneratedMvelParser.java:12022)
        org.drools.mvel.parser.GeneratedMvelParser.PrimaryPrefix(GeneratedMvelParser.java:3055)
        org.drools.mvel.parser.GeneratedMvelParser.PrimaryExpression(GeneratedMvelParser.java:2891)
        org.drools.mvel.parser.GeneratedMvelParser.PostfixExpression(GeneratedMvelParser.java:2792)
        org.drools.mvel.parser.GeneratedMvelParser.UnaryExpressionNotPlusMinus(GeneratedMvelParser.java:2772)
        org.drools.mvel.parser.GeneratedMvelParser.DrlxExpressionSwitch(GeneratedMvelParser.java:2687)
        org.drools.mvel.parser.GeneratedMvelParser.HalfBinaryExpression(GeneratedMvelParser.java:2625)
        org.drools.mvel.parser.GeneratedMvelParser.UnaryExpression(GeneratedMvelParser.java:2530)
        org.drools.mvel.parser.GeneratedMvelParser.MultiplicativeExpression(GeneratedMvelParser.java:2452)
        org.drools.mvel.parser.GeneratedMvelParser.AdditiveExpression(GeneratedMvelParser.java:2414)
        org.drools.mvel.parser.GeneratedMvelParser.ShiftExpression(GeneratedMvelParser.java:2378)
        org.drools.mvel.parser.GeneratedMvelParser.RelationalExpression(GeneratedMvelParser.java:2328)
        org.drools.mvel.parser.GeneratedMvelParser.InstanceOfExpression(GeneratedMvelParser.java:2309)
        org.drools.mvel.parser.GeneratedMvelParser.EqualityExpression(GeneratedMvelParser.java:2271)
        org.drools.mvel.parser.GeneratedMvelParser.AndExpression(GeneratedMvelParser.java:2249)
        org.drools.mvel.parser.GeneratedMvelParser.ExclusiveOrExpression(GeneratedMvelParser.java:2228)
        org.drools.mvel.parser.GeneratedMvelParser.InclusiveOrExpression(GeneratedMvelParser.java:2207)
        org.drools.mvel.parser.GeneratedMvelParser.ConditionalAndExpression(GeneratedMvelParser.java:2186)
        org.drools.mvel.parser.GeneratedMvelParser.ConditionalOrExpression(GeneratedMvelParser.java:2165)
        org.drools.mvel.parser.GeneratedMvelParser.ConditionalExpression(GeneratedMvelParser.java:2145)
        org.drools.mvel.parser.GeneratedMvelParser.Expression(GeneratedMvelParser.java:1978)
        org.drools.mvel.parser.GeneratedMvelParser.DrlxExpression(GeneratedMvelParser.java:5768)
        org.drools.mvel.parser.DrlxParser.lambda$null$0(DrlxParser.java:46)
        org.drools.mvel.parser.MvelParser.parse(MvelParser.java:155)
        org.drools.mvel.parser.DrlxParser.simplifiedParse(DrlxParser.java:60)
        org.drools.mvel.parser.DrlxParser.parseExpression(DrlxParser.java:56)
        org.drools.modelcompiler.builder.generator.DrlxParseUtil.parseExpression(DrlxParseUtil.java:624)
      

      This JIRA is split from DROOLS-5824 where this constraint caused the issue.

      $b: B( ($Bid: id <= $Aid) && (id > ($Aid - 1 )))
      

      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: