Interface DMNRuntime

All Superinterfaces:
DMNRuntimeEventManager

public interface DMNRuntime extends DMNRuntimeEventManager
  • Method Details

    • getModels

      List<DMNModel> getModels()
      Returns a list of all models available to this runtime
      Returns:
      the list of available models. An empty list in case no model is available.
    • getModel

      DMNModel getModel(String namespace, String modelName)
      Returns the model registered with the given namespace and model name.
      Parameters:
      namespace - the name space for the model
      modelName - the name of the model
      Returns:
      the corresponding DMN model, or null if none is registered with the given name and namespace.
    • getModelById

      DMNModel getModelById(String namespace, String modelId)
      Returns the model registered with the given namespace and model id.
      Parameters:
      namespace - the name space for the model
      modelId - the identifier of the model
      Returns:
      the corresponding DMN model, or null if none is registered with the given id and namespace.
    • evaluateAll

      DMNResult evaluateAll(DMNModel model, DMNContext context)
      Evaluate all decisions for the model, given the context
      Parameters:
      model - the model to evaluate
      context - the context with all the input variables
      Returns:
      the result of the evaluation
    • evaluateDecisionByName

      @Deprecated DMNResult evaluateDecisionByName(DMNModel model, String decisionName, DMNContext context)
      Deprecated.
      Evaluate the decision identified by the given name and all dependent decisions, given the context
      Parameters:
      model - the model to evaluate
      decisionName - the root decision to evaluate, identified by name
      context - the context with all the input variables
      Returns:
      the result of the evaluation
    • evaluateDecisionById

      @Deprecated DMNResult evaluateDecisionById(DMNModel model, String decisionId, DMNContext context)
      Deprecated.
      Evaluate the decision identified by the given ID and all dependent decisions, given the context
      Parameters:
      model - the model to evaluate
      decisionId - the root decision to evaluate, identified by ID
      context - the context with all the input variables
      Returns:
      the result of the evaluation
    • evaluateByName

      DMNResult evaluateByName(DMNModel model, DMNContext context, String... decisionNames)
      Evaluate all decisions identified by the given names and all dependent decisions, given the context
      Parameters:
      model - the model to evaluate
      decisionNames - list of root decisions to evaluate, identified by name
      context - the context with all the input variables
      Returns:
      the result of the evaluation
    • evaluateById

      DMNResult evaluateById(DMNModel model, DMNContext context, String... decisionIds)
      Evaluate all decision identified by the given IDs and all dependent decisions, given the context
      Parameters:
      model - the model to evaluate
      decisionIds - list of root decisions to evaluate, identified by ID
      context - the context with all the input variables
      Returns:
      the result of the evaluation
    • newContext

      DMNContext newContext()
      Creates a new empty DMNContext
      Returns:
      a new empty DMNContext
    • getRootClassLoader

      ClassLoader getRootClassLoader()
      Returns the ClassLoader used by this DMNRuntime
    • evaluateDecisionService

      DMNResult evaluateDecisionService(DMNModel model, DMNContext context, String decisionServiceName)
      Evaluate the Decision Service identified by the given name, given the context
      Parameters:
      model - the model to evaluate
      decisionServiceName - the Decision Service name
      context - the context with all the required inputs (inputData and inputDecision) required by the Decision Service
      Returns:
      the result of the evaluation