Class DMNScenarioRunnerHelper

    • Constructor Detail

      • DMNScenarioRunnerHelper

        public DMNScenarioRunnerHelper()
    • Method Detail

      • defineInputValues

        protected Map<String,​Object> defineInputValues​(List<InstanceGiven> backgroundData,
                                                             List<InstanceGiven> givenData)
        It returns a Map which contains the actual data in the DMN Executable Builder (BC) or DMN Context (Kogito) Typically, the Map contains a pair with the Fact Name as a Key and its Object as value (another Map containing the fact properties) (eg. "Driver": { "Name": "string" } ) In case of a Imported Fact, i.e. a Decision or a Input node imported from an external DMN file, the Map contains the Fact prefix as a Key, which is the name of the imported DMN document, and another Map as value which contains all the Imported Fact with that prefix. (eg. "imp" : { "Violation": { "Code": "string" } } ) If the the same fact is present in both Background and Given list, the Given one will override the background one.
        Parameters:
        backgroundData - ,
        givenData -
        Returns:
      • getSingleFactValueResult

        protected ValueWrapper getSingleFactValueResult​(org.drools.scenariosimulation.api.model.FactMapping factMapping,
                                                        org.drools.scenariosimulation.api.model.FactMappingValue expectedResult,
                                                        org.kie.dmn.api.core.DMNDecisionResult decisionResult,
                                                        List<org.kie.dmn.api.core.DMNMessage> failureMessages,
                                                        ExpressionEvaluator expressionEvaluator)