diff --git a/.ci/environments/quarkus-3/after.sh b/.ci/environments/quarkus-3/after.sh index 54efba4..9db765f 100755 --- a/.ci/environments/quarkus-3/after.sh +++ b/.ci/environments/quarkus-3/after.sh @@ -10,5 +10,6 @@ project_version=$(mvn -q -Dexpression=project.version -DforceStdout help:evaluat new_version=$(echo ${project_version} | awk -F. -v OFS=. '{$1 += 1 ; print}') # Change version +set -x ${mvn_cmd} -fae -N -e versions:update-parent -Dfull -DparentVersion="[${new_version}]" -DallowSnapshots=true -DgenerateBackupPoms=false ${mvn_cmd} -fae -N -e versions:update-child-modules -Dfull -DallowSnapshots=true -DgenerateBackupPoms=false diff --git a/.ci/environments/quarkus-3/patches/0002_jpmml_evaluator_changes.patch b/.ci/environments/quarkus-3/patches/0002_jpmml_evaluator_changes.patch new file mode 100644 index 0000000..74d6f71 --- /dev/null +++ b/.ci/environments/quarkus-3/patches/0002_jpmml_evaluator_changes.patch @@ -0,0 +1,96 @@ +diff --git a/kie-dmn-jpmml/pom.xml b/kie-dmn-jpmml/pom.xml +index 5a05845..6b65c77 100644 +--- a/kie-dmn-jpmml/pom.xml ++++ b/kie-dmn-jpmml/pom.xml +@@ -3,7 +3,7 @@ + + org.kie + kie-jpmml-integration +- 8.44.0-SNAPSHOT ++ 9.44.0-SNAPSHOT + ../pom.xml + + kie-dmn-jpmml +@@ -46,12 +46,6 @@ + provided + true + +- +- org.jpmml +- pmml-evaluator-extension +- provided +- true +- + + + +diff --git a/kie-dmn-jpmml/src/main/java/org/kie/dmn/jpmml/DMNjPMMLInvocationEvaluator.java b/kie-dmn-jpmml/src/main/java/org/kie/dmn/jpmml/DMNjPMMLInvocationEvaluator.java +index 8df10be..6b1aa76 100644 +--- a/kie-dmn-jpmml/src/main/java/org/kie/dmn/jpmml/DMNjPMMLInvocationEvaluator.java ++++ b/kie-dmn-jpmml/src/main/java/org/kie/dmn/jpmml/DMNjPMMLInvocationEvaluator.java +@@ -24,8 +24,7 @@ import java.util.Map; + import java.util.Map.Entry; + import java.util.function.Supplier; + +-import org.dmg.pmml.FieldName; +-import org.jpmml.evaluator.visitors.DefaultModelEvaluatorBattery; ++import org.jpmml.evaluator.visitors.ModelEvaluatorVisitorBattery; + import org.jpmml.evaluator.EvaluatorUtil; + import org.jpmml.evaluator.FieldValue; + import org.jpmml.evaluator.InputField; +@@ -53,7 +52,7 @@ public class DMNjPMMLInvocationEvaluator extends AbstractPMMLInvocationEvaluator + super(dmnNS, node, pmmlResource, model); + LoadingModelEvaluatorBuilder builder = new LoadingModelEvaluatorBuilder(); + try (InputStream documentStream = documentResource.getInputStream()) { +- Supplier visitors = () -> new DefaultModelEvaluatorBattery(); ++ Supplier visitors = ModelEvaluatorVisitorBattery::new; + evaluator = builder.setLocatable(false) + .setVisitors(visitors.get()) + .load(documentStream) +@@ -66,16 +65,16 @@ public class DMNjPMMLInvocationEvaluator extends AbstractPMMLInvocationEvaluator + public EvaluatorResult evaluate(DMNRuntimeEventManager eventManager, DMNResult dmnr) { + List inputFields = evaluator.getInputFields(); + +- Map arguments = new LinkedHashMap<>(); ++ Map arguments = new LinkedHashMap<>(); + for (InputField inputField : inputFields) { +- FieldName inputName = inputField.getName(); +- Object rawValue = getValueForPMMLInput(dmnr, inputName.getValue()); ++ String inputName = inputField.getName(); ++ Object rawValue = getValueForPMMLInput(dmnr, inputName); + FieldValue inputValue = inputField.prepare(rawValue); + LOG.trace("{}", inputName); + LOG.trace("{}", inputValue); + arguments.put(inputName, inputValue); + } +- Map results = evaluator.evaluate(arguments); ++ Map results = evaluator.evaluate(arguments); + Map resultsRecord = EvaluatorUtil.decodeAll(results); + + Map result = new HashMap<>(); +@@ -85,7 +84,7 @@ public class DMNjPMMLInvocationEvaluator extends AbstractPMMLInvocationEvaluator + } + } else { + for (OutputField of : evaluator.getOutputFields()) { +- String outputFieldName = of.getName().getValue(); ++ String outputFieldName = of.getName(); + result.put(outputFieldName, EvalHelper.coerceNumber(resultsRecord.getOrDefault(outputFieldName, null))); + } + } +diff --git a/pom.xml b/pom.xml +index 90e4c41..8fb534d 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -58,11 +58,7 @@ + pmml-evaluator + ${version.org.jpmml.evaluator} + +- +- org.jpmml +- pmml-evaluator-extension +- ${version.org.jpmml.evaluator} +- ++ + + +