Interface DmnEngine

    • Method Detail

      • getConfiguration

        DmnEngineConfiguration getConfiguration()
        The configuration of this engine.
        Returns:
        the DMN engine configuration
      • parseDecisions

        java.util.List<DmnDecision> parseDecisions​(java.io.InputStream inputStream)
        Parse all decisions in a DMN decision model.
        Parameters:
        inputStream - the InputStream of the DMN file
        Returns:
        a list of the DmnDecisions of the DMN file
        Throws:
        DmnEngineException - if an error occurs during the parsing of the decision model
      • parseDecisions

        java.util.List<DmnDecision> parseDecisions​(DmnModelInstance dmnModelInstance)
        Parse all decisions in a DMN decision model.
        Parameters:
        dmnModelInstance - the DmnModelInstance of the DMN decision model
        Returns:
        a list of the DmnDecisions of the DMN file
        Throws:
        DmnEngineException - if an error occurs during the parsing of the decision model
      • parseDecision

        DmnDecision parseDecision​(java.lang.String decisionKey,
                                  java.io.InputStream inputStream)
        Parse the decision with the given key in a DMN decision model. The key is the id attribute of the decision in the DMN XML file.
        Parameters:
        decisionKey - the key of the decision to parse
        inputStream - the InputStream 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​(java.lang.String decisionKey,
                                  DmnModelInstance dmnModelInstance)
        Parse the decision with the given key in a DMN decision model. The key is the id attribute of the decision in the DMN XML file.
        Parameters:
        decisionKey - the key of the decision to parse
        dmnModelInstance - the DmnModelInstance 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​(java.io.InputStream inputStream)
        Parse the decision requirements graph in a DMN decision model.
        Parameters:
        inputStream - the InputStream of the DMN file
        Returns:
        a list of the DmnDecisions of the DMN file
        Throws:
        DmnEngineException - if an error occurs during the parsing of the decision model
      • evaluateDecisionTable

        DmnDecisionTableResult evaluateDecisionTable​(java.lang.String decisionKey,
                                                     java.io.InputStream inputStream,
                                                     java.util.Map<java.lang.String,​java.lang.Object> variables)
        Evaluates the decision with the given key in a DMN decision model. The key is the id attribute of the decision in the DMN XML file.
        Parameters:
        decisionKey - the key of the decision to evaluated
        inputStream - the InputStream of the DMN file
        variables - 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 key
        DmnEngineException - if the decision is not implemented as decision table
        DmnEngineException - if an error occurs during the evaluation
        See Also:
        evaluateDecision(String, InputStream, Map)
      • evaluateDecisionTable

        DmnDecisionTableResult evaluateDecisionTable​(java.lang.String decisionKey,
                                                     java.io.InputStream inputStream,
                                                     VariableContext variableContext)
        Evaluates the decision with the given key in a DMN decision model. The key is the id attribute of the decision in the DMN XML file.
        Parameters:
        decisionKey - the key of the decision to evaluated
        inputStream - the InputStream of the DMN file
        variableContext - 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 key
        DmnEngineException - if the decision is not implemented as decision table
        DmnEngineException - if an error occurs during the evaluation
        See Also:
        evaluateDecision(String, InputStream, VariableContext)
      • evaluateDecisionTable

        DmnDecisionTableResult evaluateDecisionTable​(java.lang.String decisionKey,
                                                     DmnModelInstance dmnModelInstance,
                                                     java.util.Map<java.lang.String,​java.lang.Object> variables)
        Evaluates the decision with the given key in a DMN decision model. The key is the id attribute of the decision in the DMN XML file.
        Parameters:
        decisionKey - the key of the decision to evaluated
        dmnModelInstance - the DmnModelInstance of the DMN decision model
        variables - 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 key
        DmnEngineException - if the decision is not implemented as decision table
        DmnEngineException - if an error occurs during the evaluation
        See Also:
        evaluateDecision(String, DmnModelInstance, Map)
      • evaluateDecision

        DmnDecisionResult evaluateDecision​(DmnDecision decision,
                                           java.util.Map<java.lang.String,​java.lang.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 - the DmnDecision to evaluate
        variables - 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 supported
        DmnEngineException - 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 - the DmnDecision to evaluate
        variableContext - 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 supported
        DmnEngineException - if an error occurs during the evaluation
      • evaluateDecision

        DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                           java.io.InputStream inputStream,
                                           java.util.Map<java.lang.String,​java.lang.Object> variables)
        Evaluates the decision with the given key in a DMN decision model. The key is the id 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 evaluated
        inputStream - the InputStream of the DMN file
        variables - 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 key
        DmnEngineException - if the decision logic is not supported
        DmnEngineException - if an error occurs during the evaluation
      • evaluateDecision

        DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                           java.io.InputStream inputStream,
                                           VariableContext variableContext)
        Evaluates the decision with the given key in a DMN decision model. The key is the id 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 evaluated
        inputStream - the InputStream of the DMN file
        variableContext - 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 key
        DmnEngineException - if the decision logic is not supported
        DmnEngineException - if an error occurs during the evaluation
      • evaluateDecision

        DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                           DmnModelInstance dmnModelInstance,
                                           java.util.Map<java.lang.String,​java.lang.Object> variables)
        Evaluates the decision with the given key in a DMN decision model. The key is the id 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 evaluated
        dmnModelInstance - the DmnModelInstance of the DMN decision model
        variables - 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 key
        DmnEngineException - if the decision logic is not supported
        DmnEngineException - if an error occurs during the evaluation
      • evaluateDecision

        DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                           DmnModelInstance dmnModelInstance,
                                           VariableContext variableContext)
        Evaluates the decision with the given key in a DMN decision model. The key is the id 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 evaluated
        dmnModelInstance - the DmnModelInstance of the DMN decision model
        variableContext - 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 model
        DmnEngineException - if no decision is found with the given key
        DmnEngineException - if the decision logic is not supported
        DmnEngineException - if an error occurs during the evaluation