Class DMNScenarioRunnerHelper

    • Constructor Detail

      • DMNScenarioRunnerHelper

        public DMNScenarioRunnerHelper()
    • Method Detail

      • executeScenario

        protected java.util.Map<java.lang.String,​java.lang.Object> executeScenario​(org.kie.api.runtime.KieContainer kieContainer,
                                                                                         ScenarioRunnerData scenarioRunnerData,
                                                                                         ExpressionEvaluatorFactory expressionEvaluatorFactory,
                                                                                         org.drools.scenariosimulation.api.model.ScesimModelDescriptor scesimModelDescriptor,
                                                                                         org.drools.scenariosimulation.api.model.Settings settings)
        Specified by:
        executeScenario in class AbstractRunnerHelper
      • defineInputValues

        protected java.util.Map<java.lang.String,​java.lang.Object> defineInputValues​(java.util.List<InstanceGiven> backgroundData,
                                                                                           java.util.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,
                                                        java.util.List<org.kie.dmn.api.core.DMNMessage> failureMessages,
                                                        ExpressionEvaluator expressionEvaluator)
      • createObject

        protected java.lang.Object createObject​(ValueWrapper<java.lang.Object> initialInstance,
                                                java.lang.String className,
                                                java.util.Map<java.util.List<java.lang.String>,​java.lang.Object> params,
                                                java.lang.ClassLoader classLoader)
        Description copied from class: AbstractRunnerHelper
        Create and fill object with params. InitialInstance can contain the initial instance to use generated by an expression
        Specified by:
        createObject in class AbstractRunnerHelper
        Returns: