Class DefaultDmnEngine

  • All Implemented Interfaces:
    DmnEngine

    public class DefaultDmnEngine
    extends java.lang.Object
    implements DmnEngine
    • Method Detail

      • parseDecisions

        public java.util.List<DmnDecision> parseDecisions​(java.io.InputStream inputStream)
        Description copied from interface: DmnEngine
        Parse all decisions in a DMN decision model.
        Specified by:
        parseDecisions in interface DmnEngine
        Parameters:
        inputStream - the InputStream of the DMN file
        Returns:
        a list of the DmnDecisions of the DMN file
      • parseDecision

        public DmnDecision parseDecision​(java.lang.String decisionKey,
                                         java.io.InputStream inputStream)
        Description copied from interface: DmnEngine
        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.
        Specified by:
        parseDecision in interface DmnEngine
        Parameters:
        decisionKey - the key of the decision to parse
        inputStream - the InputStream of the DMN file
        Returns:
        the first DmnDecision of the DMN file
      • parseDecision

        public DmnDecision parseDecision​(java.lang.String decisionKey,
                                         DmnModelInstance dmnModelInstance)
        Description copied from interface: DmnEngine
        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.
        Specified by:
        parseDecision in interface DmnEngine
        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
      • evaluateDecisionTable

        public DmnDecisionTableResult evaluateDecisionTable​(java.lang.String decisionKey,
                                                            java.io.InputStream inputStream,
                                                            java.util.Map<java.lang.String,​java.lang.Object> variables)
        Description copied from interface: DmnEngine
        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.
        Specified by:
        evaluateDecisionTable in interface DmnEngine
        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
        See Also:
        DmnEngine.evaluateDecision(String, InputStream, Map)
      • evaluateDecision

        public DmnDecisionResult evaluateDecision​(DmnDecision decision,
                                                  java.util.Map<java.lang.String,​java.lang.Object> variables)
        Description copied from interface: DmnEngine
        Evaluates a decision. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).
        Specified by:
        evaluateDecision in interface DmnEngine
        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
      • evaluateDecision

        public DmnDecisionResult evaluateDecision​(DmnDecision decision,
                                                  VariableContext variableContext)
        Description copied from interface: DmnEngine
        Evaluates a decision. The decision can be implemented as any kind of supported decision logic (e.g., decision table, literal expression).
        Specified by:
        evaluateDecision in interface DmnEngine
        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
      • evaluateDecision

        public DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                                  java.io.InputStream inputStream,
                                                  java.util.Map<java.lang.String,​java.lang.Object> variables)
        Description copied from interface: DmnEngine
        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).
        Specified by:
        evaluateDecision in interface DmnEngine
        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
      • evaluateDecision

        public DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                                  java.io.InputStream inputStream,
                                                  VariableContext variableContext)
        Description copied from interface: DmnEngine
        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).
        Specified by:
        evaluateDecision in interface DmnEngine
        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
      • evaluateDecision

        public DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                                  DmnModelInstance dmnModelInstance,
                                                  java.util.Map<java.lang.String,​java.lang.Object> variables)
        Description copied from interface: DmnEngine
        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).
        Specified by:
        evaluateDecision in interface DmnEngine
        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
      • evaluateDecision

        public DmnDecisionResult evaluateDecision​(java.lang.String decisionKey,
                                                  DmnModelInstance dmnModelInstance,
                                                  VariableContext variableContext)
        Description copied from interface: DmnEngine
        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).
        Specified by:
        evaluateDecision in interface DmnEngine
        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