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

Verify method of KieHelper doesnt' write KieModuleModel to KieFileSystem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 7.56.0.Final
    • integration
    • None

      In KieHelper's getKieContainer() method we have:
       {{InternalKieBuilder kieBuilder = (( InternalKieBuilder ) ks.newKieBuilder( kfs, classLoader ));
      kieBuilder.withKModuleModel( kieModuleModel ).buildAll(projectType);
      Results results = kieBuilder.getResults();}}
      this is fine, and works fine. However, before calling getKieContainer method, one could call verify to check if everything is fine, however it's implementation is:
       {{KieBuilder kieBuilder = ks.newKieBuilder( kfs, classLoader ).buildAll();
      return kieBuilder.getResults();}}
      which lacks writing of KieModuleModel to KieFileSystem. So, for example, if you're providing a custom evaluator with:
       kModuleModel.setConfigurationProperty("drools.evaluator.custom", CustomEvaluatorDefinition.class.getName());
      In previous versions (e.g. 7.28.0), setKieModuleModel method immediately writes kieModuleModel.toXML() to KieFileSystem.

              mfusco@redhat.com Mario Fusco
              hasancansaral Hasan Can Saral (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: