1 Reply Latest reply on Jul 20, 2006 5:19 AM by Thierry R

    JBOSSRULES: migration from drools 2.X to drools 3.X

    Thierry R Newbie

      Hi all,

      I have been using drools 2.x (before it becomes part of jboss) for about 1 year and I'm trying now to migrate my scripts to jbossrules 3.0.1.

      I have made the necessary rewriting (XML => plain DRL). Unfortunatly my rules don't compile any more.

      I'm wondering if there are a few regression issues :
      - a function call within another function is illegal
      - reduced conditional expression is illegal in the consequence part (RHS) :

      LV = (C)?V1:V2


      I know there are work-around for these issues (helper class in the first case and if/else in the second) but I don't understand why valid java constructions don't compile anymore.

      The problem occurs for sure with the janino compiler and maybe with the eclipse compiler.

      Thank you for your answers

        • 1. Re: JBOSSRULES: migration from drools 2.X to drools 3.X
          Thierry R Newbie

          Hi again,

          The problem occurs too with the eclipse compiler :

          PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
          conf.setCompiler( PackageBuilderConfiguration.ECLIPSE );
          PackageBuilder builder = new PackageBuilder(conf);
          


          When a function call another function the compiler makes this output :
          Function Compilation error

          Maybe it's worth opening a JIRA bug ?