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

Unable to save drl file using drlDumper when drl contains a BehaviorDescrBuilder for sliding time windows

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 6.2.0.Final
    • Fix Version/s: 6.3.0.CR1
    • Component/s: tools
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Adding this to a RuleDescrBuilder.lhs():
      List<String> myParams = new LinkedList<String>();
      myParams.add(nSecs+"s");
      lhsDescr.not().pattern(PAYLOAD_OBJ).constraint(constraint.toString()).behavior().type("window", "time").parameters(myParams).end();

      causes the drlDumper to fail with the error:
      org.mvel2.PropertyAccessException: [Error: could not access: params; in class: org.drools.compiler.lang.descr.BehaviorDescr]
      [Near :

      {... b.params ....}

      ]
      ^
      [Line: 1, Column: 1]
      at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:706) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:360) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:163) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.MVEL.executeExpression(MVEL.java:930) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:84) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledExpressionNode.eval(CompiledExpressionNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledExpressionNode.eval(CompiledExpressionNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:114) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:128) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledExpressionNode.eval(CompiledExpressionNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CommentNode.eval(CommentNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:207) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledNamedIncludeNode.eval(CompiledNamedIncludeNode.java:71) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:114) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:207) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledNamedIncludeNode.eval(CompiledNamedIncludeNode.java:71) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CommentNode.eval(CommentNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:207) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledNamedIncludeNode.eval(CompiledNamedIncludeNode.java:71) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:114) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:207) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledNamedIncludeNode.eval(CompiledNamedIncludeNode.java:71) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledCodeNode.eval(CompiledCodeNode.java:51) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:207) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledNamedIncludeNode.eval(CompiledNamedIncludeNode.java:71) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:128) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:128) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledExpressionNode.eval(CompiledExpressionNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledExpressionNode.eval(CompiledExpressionNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:114) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:128) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TerminalNode.eval(TerminalNode.java:35) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledForEachNode.eval(CompiledForEachNode.java:128) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledIfNode.eval(CompiledIfNode.java:44) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.CompiledExpressionNode.eval(CompiledExpressionNode.java:46) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.res.TextNode.eval(TextNode.java:42) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255) ~[mvel2-2.2.4.Final.jar:?]
      at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:207) ~[mvel2-2.2.4.Final.jar:?]
      at org.drools.compiler.lang.DrlDumper.dump(DrlDumper.java:61) ~[drools-compiler-6.2.0.Final.jar:6.2.0.Final]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                dw-milla David Weir
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: