Package org.camunda.bpm.dmn.engine
Interface DmnEngine
-
- All Known Implementing Classes:
DefaultDmnEngine
public interface DmnEngine
A DMN engine which can parse DMN decision models and evaluate decisions.A new DMN engine can be build with a DMN engine configuration (see
DmnEngineConfiguration.buildEngine()
).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DmnDecisionResult
evaluateDecision(String decisionKey, InputStream inputStream, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionResult
evaluateDecision(String decisionKey, InputStream inputStream, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionResult
evaluateDecision(String decisionKey, DmnModelInstance dmnModelInstance, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionResult
evaluateDecision(String decisionKey, DmnModelInstance dmnModelInstance, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionResult
evaluateDecision(DmnDecision decision, Map<String,Object> variables)
Evaluates a decision.DmnDecisionResult
evaluateDecision(DmnDecision decision, VariableContext variableContext)
Evaluates a decision.DmnDecisionTableResult
evaluateDecisionTable(String decisionKey, InputStream inputStream, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionTableResult
evaluateDecisionTable(String decisionKey, InputStream inputStream, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionTableResult
evaluateDecisionTable(String decisionKey, DmnModelInstance dmnModelInstance, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionTableResult
evaluateDecisionTable(String decisionKey, DmnModelInstance dmnModelInstance, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model.DmnDecisionTableResult
evaluateDecisionTable(DmnDecision decision, Map<String,Object> variables)
Evaluates a decision which is implemented as decision table.DmnDecisionTableResult
evaluateDecisionTable(DmnDecision decision, VariableContext variableContext)
Evaluates a decision which is implemented as decision table.DmnEngineConfiguration
getConfiguration()
The configuration of this engine.DmnDecision
parseDecision(String decisionKey, InputStream inputStream)
Parse the decision with the given key in a DMN decision model.DmnDecision
parseDecision(String decisionKey, DmnModelInstance dmnModelInstance)
Parse the decision with the given key in a DMN decision model.DmnDecisionRequirementsGraph
parseDecisionRequirementsGraph(InputStream inputStream)
Parse the decision requirements graph in a DMN decision model.DmnDecisionRequirementsGraph
parseDecisionRequirementsGraph(DmnModelInstance dmnModelInstance)
Parse the decision requirements graph in a DMN decision model.List<DmnDecision>
parseDecisions(InputStream inputStream)
Parse all decisions in a DMN decision model.List<DmnDecision>
parseDecisions(DmnModelInstance dmnModelInstance)
Parse all decisions in a DMN decision model.
-
-
-
Method Detail
-
getConfiguration
DmnEngineConfiguration getConfiguration()
The configuration of this engine.- Returns:
- the DMN engine configuration
-
parseDecisions
List<DmnDecision> parseDecisions(InputStream inputStream)
Parse all decisions in a DMN decision model.- Parameters:
inputStream
- theInputStream
of the DMN file- Returns:
- a list of the
DmnDecision
s of the DMN file - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision model
-
parseDecisions
List<DmnDecision> parseDecisions(DmnModelInstance dmnModelInstance)
Parse all decisions in a DMN decision model.- Parameters:
dmnModelInstance
- theDmnModelInstance
of the DMN decision model- Returns:
- a list of the
DmnDecision
s of the DMN file - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision model
-
parseDecision
DmnDecision parseDecision(String decisionKey, InputStream inputStream)
Parse the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file.- Parameters:
decisionKey
- the key of the decision to parseinputStream
- theInputStream
of the DMN file- Returns:
- the first
DmnDecision
of the DMN file - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision model
-
parseDecision
DmnDecision parseDecision(String decisionKey, DmnModelInstance dmnModelInstance)
Parse the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file.- Parameters:
decisionKey
- the key of the decision to parsedmnModelInstance
- theDmnModelInstance
of the DMN decision model- Returns:
- the first
DmnDecision
of the DMN file - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision model
-
parseDecisionRequirementsGraph
DmnDecisionRequirementsGraph parseDecisionRequirementsGraph(InputStream inputStream)
Parse the decision requirements graph in a DMN decision model.- Parameters:
inputStream
- theInputStream
of the DMN file- Returns:
- a list of the
DmnDecision
s of the DMN file - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision model
-
parseDecisionRequirementsGraph
DmnDecisionRequirementsGraph parseDecisionRequirementsGraph(DmnModelInstance dmnModelInstance)
Parse the decision requirements graph in a DMN decision model.- Parameters:
dmnModelInstance
- theDmnModelInstance
of the DMN decision model- Returns:
- a list of the
DmnDecision
s of the DMN file - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision model
-
evaluateDecisionTable
DmnDecisionTableResult evaluateDecisionTable(DmnDecision decision, Map<String,Object> variables)
Evaluates a decision which is implemented as decision table.- Parameters:
decision
- theDmnDecision
to evaluatevariables
- the variables which are available during the evaluation of expressions in the decision table- Returns:
- the
DmnDecisionTableResult
of this evaluation - Throws:
DmnEngineException
- if the decision is not implemented as decision table (seeDmnDecision.isDecisionTable()
DmnEngineException
- if an error occurs during the evaluation- See Also:
evaluateDecision(DmnDecision, Map)
-
evaluateDecisionTable
DmnDecisionTableResult evaluateDecisionTable(DmnDecision decision, VariableContext variableContext)
Evaluates a decision which is implemented as decision table.- Parameters:
decision
- theDmnDecision
to evaluatevariableContext
- the variables context which is available during the evaluation of expressions in the decision table- Returns:
- the
DmnDecisionTableResult
of this evaluation - Throws:
DmnEngineException
- if the decision is not implemented as decision table (seeDmnDecision.isDecisionTable()
DmnEngineException
- if an error occurs during the evaluation- See Also:
evaluateDecision(DmnDecision, VariableContext)
-
evaluateDecisionTable
DmnDecisionTableResult evaluateDecisionTable(String decisionKey, InputStream inputStream, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file.- Parameters:
decisionKey
- the key of the decision to evaluatedinputStream
- theInputStream
of the DMN filevariables
- the variables which are available during the evaluation of expressions in the decision table- Returns:
- the
DmnDecisionTableResult
of this evaluation - Throws:
DmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision is not implemented as decision tableDmnEngineException
- if an error occurs during the evaluation- See Also:
evaluateDecision(String, InputStream, Map)
-
evaluateDecisionTable
DmnDecisionTableResult evaluateDecisionTable(String decisionKey, InputStream inputStream, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file.- Parameters:
decisionKey
- the key of the decision to evaluatedinputStream
- theInputStream
of the DMN filevariableContext
- the variables context which is available during the evaluation of expressions in the decision table- Returns:
- the
DmnDecisionTableResult
of this evaluation - Throws:
DmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision is not implemented as decision tableDmnEngineException
- if an error occurs during the evaluation- See Also:
evaluateDecision(String, InputStream, VariableContext)
-
evaluateDecisionTable
DmnDecisionTableResult evaluateDecisionTable(String decisionKey, DmnModelInstance dmnModelInstance, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file.- Parameters:
decisionKey
- the key of the decision to evaluateddmnModelInstance
- theDmnModelInstance
of the DMN decision modelvariables
- the variables which are available during the evaluation of expressions in the decision table- Returns:
- the
DmnDecisionTableResult
of this evaluation - Throws:
DmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision is not implemented as decision tableDmnEngineException
- if an error occurs during the evaluation- See Also:
evaluateDecision(String, DmnModelInstance, Map)
-
evaluateDecisionTable
DmnDecisionTableResult evaluateDecisionTable(String decisionKey, DmnModelInstance dmnModelInstance, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file.- Parameters:
decisionKey
- the key of the decision to evaluateddmnModelInstance
- theDmnModelInstance
of the DMN decision modelvariableContext
- the variables context which is available during the evaluation of expressions in the decision table- Returns:
- the
DmnDecisionTableResult
of this evaluation - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision modelDmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision is not implemented as decision tableDmnEngineException
- if an error occurs during the evaluation- See Also:
evaluateDecision(String, DmnModelInstance, VariableContext)
-
evaluateDecision
DmnDecisionResult evaluateDecision(DmnDecision decision, Map<String,Object> variables)
Evaluates a decision. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).- Parameters:
decision
- theDmnDecision
to evaluatevariables
- the variables which are available during the evaluation of expressions in the decision- Returns:
- the
DmnDecisionResult
of this evaluation - Throws:
DmnEngineException
- if the decision logic is not supportedDmnEngineException
- if an error occurs during the evaluation
-
evaluateDecision
DmnDecisionResult evaluateDecision(DmnDecision decision, VariableContext variableContext)
Evaluates a decision. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).- Parameters:
decision
- theDmnDecision
to evaluatevariableContext
- the variables context which is available during the evaluation of expressions in the table- Returns:
- the
DmnDecisionResult
of this evaluation - Throws:
DmnEngineException
- if the decision logic is not supportedDmnEngineException
- if an error occurs during the evaluation
-
evaluateDecision
DmnDecisionResult evaluateDecision(String decisionKey, InputStream inputStream, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).- Parameters:
decisionKey
- the key of the decision to evaluatedinputStream
- theInputStream
of the DMN filevariables
- the variables which are available during the evaluation of expressions in the decision- Returns:
- the
DmnDecisionResult
of this evaluation - Throws:
DmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision logic is not supportedDmnEngineException
- if an error occurs during the evaluation
-
evaluateDecision
DmnDecisionResult evaluateDecision(String decisionKey, InputStream inputStream, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).- Parameters:
decisionKey
- the key of the decision to evaluatedinputStream
- theInputStream
of the DMN filevariableContext
- the variables context which is available during the evaluation of expressions in the decision- Returns:
- the
DmnDecisionResult
of this evaluation - Throws:
DmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision logic is not supportedDmnEngineException
- if an error occurs during the evaluation
-
evaluateDecision
DmnDecisionResult evaluateDecision(String decisionKey, DmnModelInstance dmnModelInstance, Map<String,Object> variables)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).- Parameters:
decisionKey
- the key of the decision to evaluateddmnModelInstance
- theDmnModelInstance
of the DMN decision modelvariables
- the variables which are available during the evaluation of expressions in the decision- Returns:
- the
DmnDecisionResult
of this evaluation - Throws:
DmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision logic is not supportedDmnEngineException
- if an error occurs during the evaluation
-
evaluateDecision
DmnDecisionResult evaluateDecision(String decisionKey, DmnModelInstance dmnModelInstance, VariableContext variableContext)
Evaluates the decision with the given key in a DMN decision model. The key is theid
attribute of the decision in the DMN XML file. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).- Parameters:
decisionKey
- the key of the decision to evaluateddmnModelInstance
- theDmnModelInstance
of the DMN decision modelvariableContext
- the variables context which is available during the evaluation of expressions in the decision- Returns:
- the
DmnDecisionResult
of this evaluation - Throws:
DmnEngineException
- if an error occurs during the parsing of the decision modelDmnEngineException
- if no decision is found with the given keyDmnEngineException
- if the decision logic is not supportedDmnEngineException
- if an error occurs during the evaluation
-
-