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

Avoid direct invocation of PMMLModelExecutor.evaluate

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None

      Change PMMLModelExecutor public API so that user should not retrieve the KiePMMLModel to invoke the "evaluate" method

      PMML4Result evaluate(final KieBase knowledgeBase, KiePMMLModel model, PMMLContext context)

      ->

      PMML4Result evaluate(final KieBase knowledgeBase, String modelName, PMMLContext context);

      Create AbstractPMMLModelExecutor that implement the above interface and declare an abstract method

      PMML4Result evaluate(final KieBase knowledgeBase, KiePMMLModel model, PMMLContext context)

      AbstractPMMLModelExecutor should then use KnoweledgeBaseUtils to retrieve the KiePMMLModel and invoke/delegate to actual implementations

      Actual implementations should then extend AbstractPMMLModelExecutor

      The PMMLModelExecutor API should be intended as private API, i.e. users should not invoke it directly, nor they should need to retrieve the KiePMMLModel.
      Unfortunately, for the moment being the KiePMMLModel is needed to retrieve the actual implementation of PMMLModelExecutor, so it is not possible to invoke

      PMMLModelExecutor.evaluate(...)
      

      on it using only the model name without retrieve the KiePMMLModel itself before.
      For the moment being this ticket will remove usage of PMMLModelExecutor implementation inside integrations tests.
      Moreover, there will also be a small name refactoring to uniform the name of the classes in the hierarchy, so that the main interface will be
      PMMLModelEvaluator, and all the implementing class will end with "Evaluator"

              gcardosi Gabriele Cardosi (Inactive)
              gcardosi Gabriele Cardosi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: