Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1721

Provide a way to make the BRMS part of guvnor usable from the JSR-94 implementation.

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Patch
    • Resolution: Done
    • Major
    • 5.0.0.M2
    • 4.0.7, 5.0.0.M1, 5.0.0.M2, FUTURE
    • drools-jsr94
    • None

    Description

      The current JSR-94 implementation unnecessarily limits itself to only make use of a simple map based repository for rule execution sets.
      It would be much more powerful if one could provide its own implementation of the rule execution set repository. Exactly this is the intend
      of the supplied patch. For short the supplied patch works as follows

      • provides a RuleExecutionSetRepository interface
      • provides a default implementation of the above interface (with the same behaviour as the current implementation)
      • consequently pass the provided properties map to the RuleExecutionSetRepository where possible to support e.g.
        authentication and authorization
      • provides a RuleExecutionSetRepositoryLoader to resolve the RuleExecutionSetRepository implementation to be
        used using the following algorithm

      1. If a resource with the name of META-INF/services/org.drools.jsr94.rules.repository.RuleExecutionSetRepository exists,
      then its first line, if present, is used as the UTF-8 encoded name of the implementation class.

      2. If the drools.properties file exists in the classpath and it is readable by the java.util.Properties.load(InputStream) method
      and it contains an entry whose key is org.drools.jsr94.rules.repository.RuleExecutionSetRepository, then the value of that
      entry is used as the name of the implementation class.

      3. If a system property with the name org.drools.jsr94.rules.repository.RuleExecutionSetRepository is defined, then its value
      is used as the name of the implementation class.

      4. Finally, a default implementation class name, if provided, is used.

      'Cause I didn't want to change the dependencies of the drools-jsr94 project and to "pollute" it e.g. with dependencies to drools-repository
      and jackrabbit the attached patch only provides the default implementation of the RuleExecutionSetRepository interface. An implementation
      that makes use of the BRMS part of guvnor will shortly be made available through the "Rules Framework" project @ SourceForge, see
      http://sourceforge.net/projects/rules/ for more information. This can be changed in the future.

      FYI, the default behaviour of the supplied patch is the same as the current implementation.

      The attached patch drools-jsr94-4.0.7.19894.GA.patch is supposed to work with the 4.0.x line of drools from version 4.0.7 upwards,
      and the attached patch drools-jsr94-trunk.patch is supposed to work with the 5.0.x line of drools.

      STATUS:

      • all existing unit tests for drools-jsr94 passed with the applied patch
      • the RuleExecutionRepositoryLoader lacks the processing of the drools.properties file
      • unit tests for the patch are still missing

      For a short discussion of this issue see also #JBRULES-1273.

      Attachments

        Activity

          People

            michaelneale_jira Michael Neale (Inactive)
            RainerLangbehn Rainer Langbehn (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty