1 2 Previous Next 17 Replies Latest reply on Nov 28, 2007 1:07 PM by jeffdelong Go to original post
      • 15. Re: Rule Parsing error while adding cutom object information
        vsahni

        I am not using or. It was just a text to communicate that I tried Message as well as errorList.

        • 16. Re: Rule Parsing error while adding cutom object information
          vsahni

          Some Progress is made on my front on this which I would like to share with you:

          On removing the dependency of dsl file the ErrorList and Message object just works fine.

          Problem and Question is why using .dsl for some expansions does not allow expansion of objects such Message and ErrorList in .drl file.

          We have some definitions in .dsl file which we would like to expand upon in .drl file and in addition to that we would like to set values of custom objects in .drl file.

          Your help is much appreciated.

          Thanks.
          Vineet

          • 17. Re: Rule Parsing error while adding cutom object information
            jeffdelong

            Perhaps you did not understand what I described in one of my previous responses. When you add the expander statement at the top of a .drl file, it tells the compiler to use the referenced DSL to interpret the statements. You cannot mix drl and dsl language constructs in the same file. This is a bit confusing, so with 4.0 Drools has suggested naming a file that contains dsl based rules a .dslr file. Files with extension .dslr would have rules that were expanded by the referenced dsl file.

            With Drools you can create rulebases that combine both "technical" rules (.drl) and "domain specific rules" (.dslr) but they have to be defined in separate files. With JBossESB there is currently no way to describe multiple rule files in the jboss-esb.xml. For content based routing, we figure a single rule file should be sufficient (in the later versions of the ruleservice we expect to support the Drools RuleAgent API, which allows pre-compiled packages of different types of rules to be accessed at runtime, but this is not envisioned as necessary for CBR).

            In your case, as I mentioned in previous post, you can add to the OLXPathLanguage.dsl any new mappings that you would like, and then use these DSL expressions in your rule files. E.g. 'There is an ErrorList' could map to errors : ErrorList()

            If your would like to learn more about Drools, I suggest you download the latest version (4.0.3) and read the user manual (particularly the section on DSLs).

            1 2 Previous Next