Skip to content

Scesim fails to execute decision service from included model #6881

Description

@dschulten

Describe the bug

I run the following scenario simulation:

Kostenkennwerte pro Gebaeudeart.scesim.xml

Against this model:
Kostenkennwerte pro Gebaeudeart.dmn.xml

which includes 2 models:

Basiskostenkennwert.dmn.xml

Korrekturfaktor Gebaeudegroesse BGF.dmn.xml

The scesim Junit Test

@TestScenarioActivator
public class TestScenarioJunitActivatorTest {

}

fails:
Error invoking function 'Basiskostenkennwert Service' on node 'Basiskostenkennwert Service'

Internally, a NPE occurs:

"java.lang.NullPointerException: Kie DMN API parameter 'model' cannot be null."

whose stacktrace points to:

org.kie.dmn.core.impl.DMNRuntimeImpl#evaluateById

It appears that the scesim testrunner somehow is unable to execute DMN Services from included models.

When I run the same service as a Spring Boot Rest Service, the DMN Service evaluates the expression just fine. Also, the sandbox happily delivers the expected result Kostenkennwert: 825

### POST Kostenkennwert 4.1 mit Korrekturen
POST {{host}}:{{port}}/KostenkennwerteProGebaeudeart
Content-Type: application/json

{
  "Gebäudeart": "Mehrfamilienhäuser",
  "Gebäudetyp": "mit bis zu 6 WE",
  "Weitere Merkmale": null,
  "Gebäudestandard": 3,
  "Angepasster Basiskostenkennwert": {
    "wert": null
  },
  "Abweichende Dachgeometrie": {
    "prozent": null
  },
  "Gebäudegröße BGF": {
    "flaecheQm": null
  },
  "Durchschnittliche Wohnungsgröße": {
    "flaecheQm": null
  },
  "Grundrissart": {
    "grundrissart": null
  },
  "Zweifamilienhaus": null
}

Expected behavior

The JUnit scesim Runner should come to the same results as the actual DMN Rest Service and the Sandbox.

Actual behavior

The scesim Runner treats included models differently.

How to Reproduce?

See above

Output of uname -a or ver

No response

Output of java -version

openjdk version "21.0.9" 2025-10-21 LTS OpenJDK Runtime Environment Corretto-21.0.9.10.1 (build 21.0.9+10-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.9.10.1 (build 21.0.9+10-LTS, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

10.2.0

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions