Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-2913

BusinessRuleTaskHandler does not work as expected due classloader issues

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 7.7.0.GA
    • jBPM Core
    • RHPAM 7.7
      EAP 7.2
      Standalone local deployment (no Openshift)
      OpenJDK 11

    Description

      Trying to use the BusinessRule Service Task (org.jbpm.process.workitem.bpmn2.BusinessRuleTaskHandler) as described in detail in Maciej's blog post [1] is not working.

      Basic usage scenario for this Service Task:

      • Setup 3 different projects: Data Model, Rules and Process
      • Add the Data Model jar as a dependency on Rules and Process Projects
      • Add the Business Rule Service Task on the process to execute rules declared in the rules Project using a different Kie Session.

      Expected result:

      • have the rules in the rules Project (external to the process' project correctly fired)

      Current result:

      • the rules do not get fired due a classLoader issue described in [2]. Even putting the Data Model jar in the kie-server/WEB-INF/lib it does not work!

      This issue was discussed internally [2] in Jun 2017. But no solution was given since then. One solution to work around this is to implement your own WIH which passes the classLoader to the KieContainer. This implementation can be found here in [3].

      I believe this Service Task implementation never worked as expected. So I think it should be fixed or removed from the product official bits.

      [1] https://mswiderski.blogspot.com/2017/04/control-business-rules-execution-from.html
      [2] http://post-office.corp.redhat.com/archives/sme-bpm/2017-June/msg00237.html
      [3] https://github.com/gpe-mw-training/advanced-process-development-labs/blob/master/policyquote-wih/etc/RulesWorkItemHandler.java.debug#L29

      Attachments

        Activity

          People

            elguardian@gmail.com Enrique González Martínez (Inactive)
            rafael.soares Rafael Soares
            Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
            Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: