Interface DecisionService

  • All Known Implementing Classes:
    DecisionServiceImpl

    public interface DecisionService
    Service to evaluate decisions inside the DMN engine.
    Author:
    Philipp Ossler
    • Method Detail

      • evaluateDecisionTableByKeyAndVersion

        DmnDecisionTableResult evaluateDecisionTableByKeyAndVersion​(String decisionDefinitionKey,
                                                                    Integer version,
                                                                    Map<String,​Object> variables)
        Evaluates the decision with the given key in the specified version. If no version is provided then the latest version of the decision definition is taken.
        Parameters:
        decisionDefinitionKey - the key of the decision definition, cannot be null.
        version - the version of the decision definition. If null then the latest version is taken.
        variables - the input values of the decision.
        Returns:
        the result of the evaluation.
        Throws:
        NotFoundException - when no decision definition is deployed with the given key and version.
        NotValidException - when the given decision definition key is null.
        AuthorizationException - if the user has no Permissions.CREATE_INSTANCE permission on Resources.DECISION_DEFINITION.
      • evaluateDecisionTableByKey

        DecisionEvaluationBuilder evaluateDecisionTableByKey​(String decisionDefinitionKey)
        Returns a fluent builder to evaluate the decision table with the given key. The builder can be used to set further properties and specify evaluation instructions.
        Parameters:
        decisionDefinitionKey - the key of the decision definition, cannot be null.
        Returns:
        a builder to evaluate a decision table
        See Also:
        evaluateDecisionByKey(String)
      • evaluateDecisionTableById

        DecisionEvaluationBuilder evaluateDecisionTableById​(String decisionDefinitionId)
        Returns a fluent builder to evaluate the decision table with the given id. The builder can be used to set further properties and specify evaluation instructions.
        Parameters:
        decisionDefinitionId - the id of the decision definition, cannot be null.
        Returns:
        a builder to evaluate a decision table
        See Also:
        evaluateDecisionById(String)
      • evaluateDecisionByKey

        DecisionsEvaluationBuilder evaluateDecisionByKey​(String decisionDefinitionKey)
        Returns a fluent builder to evaluate the decision with the given key. The builder can be used to set further properties and specify evaluation instructions.
        Parameters:
        decisionDefinitionKey - the key of the decision definition, cannot be null.
        Returns:
        a builder to evaluate a decision
      • evaluateDecisionById

        DecisionsEvaluationBuilder evaluateDecisionById​(String decisionDefinitionId)
        Returns a fluent builder to evaluate the decision with the given id. The builder can be used to set further properties and specify evaluation instructions.
        Parameters:
        decisionDefinitionId - the id of the decision definition, cannot be null.
        Returns:
        a builder to evaluate a decision