Interface DMNServicesClient

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateAll​(String containerId, String namespace, String modelName, org.kie.dmn.api.core.DMNContext dmnContext)
      Evaluate all decisions for the model identified by namespace and modelName, given the context dmnContext
      org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateAll​(String containerId, org.kie.dmn.api.core.DMNContext dmnContext)
      Convenience method to be used if the container contains only a single DMN model, to evaluate all decisions.
      org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisionById​(String containerId, String namespace, String modelName, String decisionId, org.kie.dmn.api.core.DMNContext dmnContext)
      Evaluate the decision identified by the given ID and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
      org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisionByName​(String containerId, String namespace, String modelName, String decisionName, org.kie.dmn.api.core.DMNContext dmnContext)
      Evaluate the decision identified by the given name and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
      org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisionService​(String containerId, String namespace, String modelName, String decisionServiceName, org.kie.dmn.api.core.DMNContext context)
      Evaluate the Decision Service identified by the given name, given the context
      org.kie.server.api.model.ServiceResponse<org.kie.server.api.model.dmn.DMNModelInfoList> getModels​(String containerId)
      Returns a list of all models available in the given container
      org.kie.dmn.api.core.DMNContext newContext()
      Creates a new empty DMNContext
    • Method Detail

      • getModels

        org.kie.server.api.model.ServiceResponse<org.kie.server.api.model.dmn.DMNModelInfoList> getModels​(String containerId)
        Returns a list of all models available in the given container
        Parameters:
        containerId - the container id deploying the DMN models
        Returns:
        the list of available models in container identified by containerId. An empty list in case no model is available.
      • evaluateAll

        org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateAll​(String containerId,
                                                                                             String namespace,
                                                                                             String modelName,
                                                                                             org.kie.dmn.api.core.DMNContext dmnContext)
        Evaluate all decisions for the model identified by namespace and modelName, given the context dmnContext
        Parameters:
        containerId - the container id deploying the DMN model
        namespace - namespace to identify the model to evaluate
        modelName - model name to identify the model to evaluate
        dmnContext - the context with all the input variables
        Returns:
        the result of the evaluation
      • evaluateDecisionByName

        org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisionByName​(String containerId,
                                                                                                        String namespace,
                                                                                                        String modelName,
                                                                                                        String decisionName,
                                                                                                        org.kie.dmn.api.core.DMNContext dmnContext)
        Evaluate the decision identified by the given name and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
        Parameters:
        containerId - the container id deploying the DMN model
        namespace - namespace to identify the model to evaluate
        modelName - model name to identify the model to evaluate
        decisionName - the root decision to evaluate, identified by name
        dmnContext - the context with all the input variables
        Returns:
        the result of the evaluation
      • evaluateDecisionById

        org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisionById​(String containerId,
                                                                                                      String namespace,
                                                                                                      String modelName,
                                                                                                      String decisionId,
                                                                                                      org.kie.dmn.api.core.DMNContext dmnContext)
        Evaluate the decision identified by the given ID and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
        Parameters:
        containerId - the container id deploying the DMN model
        namespace - namespace to identify the model to evaluate
        modelName - model name to identify the model to evaluate
        decisionId - the root decision to evaluate, identified by ID
        dmnContext - the context with all the input variables
        Returns:
        the result of the evaluation
      • newContext

        org.kie.dmn.api.core.DMNContext newContext()
        Creates a new empty DMNContext
        Returns:
        a new empty DMNContext
      • evaluateAll

        org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateAll​(String containerId,
                                                                                             org.kie.dmn.api.core.DMNContext dmnContext)
        Convenience method to be used if the container contains only a single DMN model, to evaluate all decisions. The method evaluateAll(String, String, String, DMNContext) shall be used for containers deploying multiple DMN model.
        Parameters:
        containerId - the container id deploying the DMN model
        dmnContext - the context with all the input variables
        Returns:
        the result of the evaluation, or an error if the container contains more than a single DMN model
      • evaluateDecisionService

        org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisionService​(String containerId,
                                                                                                         String namespace,
                                                                                                         String modelName,
                                                                                                         String decisionServiceName,
                                                                                                         org.kie.dmn.api.core.DMNContext context)
        Evaluate the Decision Service identified by the given name, given the context
        Parameters:
        containerId - the container id deploying the DMN model
        namespace - namespace to identify the model to evaluate
        modelName - model name to identify the model to evaluate
        decisionServiceName - the Decision Service name
        context - the context with all the required inputs (inputData and inputDecision) required by the Decision Service
        Returns:
        the result of the evaluation