]
Kris Verlaenen updated DROOLS-5724:
-----------------------------------
Sprint: 2020 Week 46-48 (from Nov 9), 2020 Week 49-51 (from Nov 30) (was: 2020 Week
46-48 (from Nov 9))
Fix DMN-PMML integration
------------------------
Key: DROOLS-5724
URL:
https://issues.redhat.com/browse/DROOLS-5724
Project: Drools
Issue Type: Task
Reporter: Gabriele Cardosi
Assignee: Matteo Mortari
Priority: Critical
Labels: TrustyAI
To have Trusty-PMML working withouth MVEL (i.e. drools-7.45) a fix has been made.
Unfortunately, that modification broke DMN-PMML integration inside drools.
-A very quick and dirty solution has been to-
-1) expose the-
-DMNRuntimeKB runtimeKB inside DMNRuntimeImpl-
-2) based on the actual class at runtime, if it is "DMNRuntimeKBWrappingIKB"
use a code patch the works in drools, otherwise the "kogito" one.-
-This has been done only for extreme needs, but must be redisigned and properly
implemented ASAP-
The root cause of that is DMN ignoring the Kogito API.
Kogito defines a _container_ class (org.kie.kogito.app.Application) that is meant to be
used by all components (processes, ruleunits, decisions and predictions) to invoke the
others.
Trusty PMML fullfill this API, exposing predictive models throught the the
{code:java}
org.kie.kogito.app.PredictionModels.getPredictionModel(String modelName)
{code}
but since DMNKogito completely ignore this, a painful workaround has been needed to solve
the issue.
Instead of adding workarounds one on top of the other, a different approach on DMN side
is required, respecting the constraints put by the containers.
Having done that, the DMN-PMML integration would be automatically resolved.
I'll be available for more explanation, if needed.
[~evacchi] [~danielezonca] [~tirelli] FYI