Package org.kie.dmn.api.core
Interface DMNRuntime
-
- All Superinterfaces:
DMNRuntimeEventManager
public interface DMNRuntime extends DMNRuntimeEventManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DMNResult
evaluateAll(DMNModel model, DMNContext context)
Evaluate all decisions for the model, given the contextDMNResult
evaluateById(DMNModel model, DMNContext context, String... decisionIds)
Evaluate all decision identified by the given IDs and all dependent decisions, given the contextDMNResult
evaluateByName(DMNModel model, DMNContext context, String... decisionNames)
Evaluate all decisions identified by the given names and all dependent decisions, given the contextDMNResult
evaluateDecisionById(DMNModel model, String decisionId, DMNContext context)
Deprecated.consider usingevaluateById(DMNModel, DMNContext, String...)
insteadDMNResult
evaluateDecisionByName(DMNModel model, String decisionName, DMNContext context)
Deprecated.consider usingevaluateByName(DMNModel, DMNContext, String...)
insteadDMNResult
evaluateDecisionService(DMNModel model, DMNContext context, String decisionServiceName)
Evaluate the Decision Service identified by the given name, given the contextDMNModel
getModel(String namespace, String modelName)
Returns the model registered with the given namespace and model name.DMNModel
getModelById(String namespace, String modelId)
Returns the model registered with the given namespace and model id.List<DMNModel>
getModels()
Returns a list of all models available to this runtimeClassLoader
getRootClassLoader()
Returns the ClassLoader used by this DMNRuntimeDMNContext
newContext()
Creates a new empty DMNContext-
Methods inherited from interface org.kie.dmn.api.core.event.DMNRuntimeEventManager
addListener, getListeners, getRuntime, hasListeners, removeListener
-
-
-
-
Method Detail
-
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 modelmodelName
- 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 modelmodelId
- 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 evaluatecontext
- the context with all the input variables- Returns:
- the result of the evaluation
-
evaluateDecisionByName
@Deprecated DMNResult evaluateDecisionByName(DMNModel model, String decisionName, DMNContext context)
Deprecated.consider usingevaluateByName(DMNModel, DMNContext, String...)
insteadEvaluate the decision identified by the given name and all dependent decisions, given the context- Parameters:
model
- the model to evaluatedecisionName
- the root decision to evaluate, identified by namecontext
- the context with all the input variables- Returns:
- the result of the evaluation
-
evaluateDecisionById
@Deprecated DMNResult evaluateDecisionById(DMNModel model, String decisionId, DMNContext context)
Deprecated.consider usingevaluateById(DMNModel, DMNContext, String...)
insteadEvaluate the decision identified by the given ID and all dependent decisions, given the context- Parameters:
model
- the model to evaluatedecisionId
- the root decision to evaluate, identified by IDcontext
- 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 evaluatedecisionNames
- list of root decisions to evaluate, identified by namecontext
- 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 evaluatedecisionIds
- list of root decisions to evaluate, identified by IDcontext
- 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
@GwtIncompatible 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 evaluatedecisionServiceName
- the Decision Service namecontext
- the context with all the required inputs (inputData and inputDecision) required by the Decision Service- Returns:
- the result of the evaluation
-
-