Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-10056

Inserted facts via BusinessRuleTaskHandler don't match rules because of different classloaders

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 7.68.0.Final
    • Runtime Engine
    • None
    • False
    • None
    • False
    • NEW
    • NEW
    • Hide

      Place a pojo jar (which contains the fact class) under kie-server.war/WEB-INF/lib (Not an ideal solution, though)

      Show
      Place a pojo jar (which contains the fact class) under kie-server.war/WEB-INF/lib (Not an ideal solution, though)
    • ---
    • ---

    Description

      Custom "BusinessRuleTask" is executed by org.jbpm.process.workitem.bpmn2.BusinessRuleTaskHandler

      https://docs.jbpm.org/latest/jbpm-docs/html_single/#con_custom-tasks-overview

      (Note that this is different from a standard "Business rule task" https://docs.jbpm.org/latest/jbpm-docs/html_single/#bpmn-tasks-overview-con_business-processes)

      Assuming you specify BusinessRuleTaskHandler (language=DRL) to execute the same GAV kjar as the process project, BusinessRuleTaskHandler allows to insert a fact via Data Input. However, if the fact class exists in the process project kjar, the inserted fact class is associated with process project's classloader, while ObjectTypeNode.objectType in the rule kbase (created by BusinessRuleTaskHandler) is associated with a different classloader. So the fact doesn't match the rule.

      ====

      • Add a DRL test to BusinessRuleTaskTest (jbpm-test-coverage)
      • Add a DecisionTasksIntegrationTest (kie-server-integ-tests-all) variant. Use BusinessRuleTaskHandler instead of RemoteBusinessRuleTaskHandler.

      Attachments

        Activity

          People

            rhn-support-tkobayas Toshiya Kobayashi
            rhn-support-tkobayas Toshiya Kobayashi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: