Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7239

Unable to build KieBase from Model object with property specific disabled


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.32.0.Final
    • 8.29.0.Final
    • executable model
    • None
    • 2022 Week 44-46 (from Oct 31), 2022 Week 47-49 (from Nov 21)
    • 2
    • Show
    • NEW
    • NEW
    • ---
    • ---

      We are trying to migrate to Drools8 and one thing we noticed is the "drools.propertySpecific" option seems to be treated differently as compared to Drools 7.

      Previously we relied on the serialization of KieBases for our use cases. As this is not possible anymore we found a way to make the executable model work for us. A short summary about what we are doing:

      1. We generate a bunch of complicated rules in various drl files
      2. The drl files are fed into a KieFileSystem which is used for a KieBuilder
      3. We build via "kieBuilder.buildAll(ExecutableModelProject.class)"
      4. Then we extract the class files from the MemoryFileSystem inside the KieBuilderImpl
      5. The extracted files are zipped in an artefact together with various other things we need
      6. Later in a different application we are loading the classes and build a KieBase via "KieBaseBuilder.createKieBaseFromModel(model)"

      Some of our rules rely on the "drools.propertySpecific" option being disabled. While this seemed to work fine in Drool 7 we noticed changed behaviour in Drool 8. Also the property seems to be working just fine when we directly use the KieBase built in step 3.

      From our investigation it looks like that if we build a KieBase with "KieBaseBuilder.createKieBaseFromModel(model)" the evaluation of KiePackageBuilder#getPropertySpecificOption results in the option ALWAYS as there is no way to feed a KnowledgeBuilderConfiguration into the KieBaseBuilder when building from a model.

      Could you help us with this?

            rhn-support-tkobayas Toshiya Kobayashi
            cmartensen Christian Martensen (Inactive)
            0 Vote for this issue
            2 Start watching this issue