1 Reply Latest reply on Sep 12, 2012 1:13 PM by tcunning

    Deploying rules files external to ESB archive

    dbuttery

      Hi all,

       

         Looking to see if there is any means of having a CBR rules files deployed external to the ESB archive itself.

       

         The desire here is to have the ability to add/change/delete XPath expressions and/or Destinations without having to redeploy the ESB.

       

         Using the 'cbrAlias' of 'Regex' doesn't work as this only allows the XPath expressions to be changed in the properties file.  The destinations are still required to be defined in the jboss-esb.xml.

       

         In looking at the code for DroolsRuleBaseHelper.java it is seen where the path to the provided rule set is hard-coded to be relative to classes within the ESB archive. Which means that absolute paths to the filesystem do not work ...

       

         The end goal is to have an ESB where routing rules can be managed externally at runtime by simply changing the content of the rules file.

       

          Am I (hopefully) overlooking something?

       

      Thanks,

      -Dennis

        • 1. Re: Deploying rules files external to ESB archive
          tcunning

          Dennis,


          Which action in particular are you trying to do with this?     BusinessRulesProcessor?    XPathRouter?  

           

          DroolsRuleBaseHelper says in the comments that a file on the classpath or an URL will suffice, but I haven't tested that out, classpath and URL options don't seem to be tested in the unit test, and DroolsRuleBaseHelper.getRulesInputStream makes me suspicious about whether that would work.   

           

          My guess - if the classpath/URL options don't work - would be that you might have to change DroolsRuleBaseHelper.java to do what you want it to do, but the change seems pretty trivial and it would result in you having to swap out one JAR file.

           

          If you find that the classpath / URL options don't work, please let us know here in either a JIRA or just a follow up (and I'll file a JIRA based on that).

           

          --Tom