Class DMNServicesClientImpl

    • Method Detail

      • getModels

        public org.kie.server.api.model.ServiceResponse<org.kie.server.api.model.dmn.DMNModelInfoList> getModels​(String containerId)
        Description copied from interface: DMNServicesClient
        Returns a list of all models available in the given container
        Specified by:
        getModels in interface DMNServicesClient
        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

        public org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateAll​(String containerId,
                                                                                                    org.kie.dmn.api.core.DMNContext dmnContext)
        Description copied from interface: DMNServicesClient
        Convenience method to be used if the container contains only a single DMN model, to evaluate all decisions. The method DMNServicesClient.evaluateAll(String, String, String, DMNContext) shall be used for containers deploying multiple DMN model.
        Specified by:
        evaluateAll in interface DMNServicesClient
        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
      • evaluateAll

        public 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)
        Description copied from interface: DMNServicesClient
        Evaluate all decisions for the model identified by namespace and modelName, given the context dmnContext
        Specified by:
        evaluateAll in interface DMNServicesClient
        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

        public 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)
        Description copied from interface: DMNServicesClient
        Evaluate the decision identified by the given name and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
        Specified by:
        evaluateDecisionByName in interface DMNServicesClient
        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

        public 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)
        Description copied from interface: DMNServicesClient
        Evaluate the decision identified by the given ID and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
        Specified by:
        evaluateDecisionById in interface DMNServicesClient
        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
      • evaluateDecisionService

        public 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 dmnContext)
        Description copied from interface: DMNServicesClient
        Evaluate the Decision Service identified by the given name, given the context
        Specified by:
        evaluateDecisionService in interface DMNServicesClient
        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
        dmnContext - the context with all the required inputs (inputData and inputDecision) required by the Decision Service
        Returns:
        the result of the evaluation
      • evaluateDecisions

        public org.kie.server.api.model.ServiceResponse<org.kie.dmn.api.core.DMNResult> evaluateDecisions​(String containerId,
                                                                                                          org.kie.server.api.model.dmn.DMNContextKS payload)
        Please notice this method is NOT exposed to the API interface.
      • newContext

        public org.kie.dmn.api.core.DMNContext newContext()
        Description copied from interface: DMNServicesClient
        Creates a new empty DMNContext
        Specified by:
        newContext in interface DMNServicesClient
        Returns:
        a new empty DMNContext
      • getBigDecimalOrNull

        public static BigDecimal getBigDecimalOrNull​(Object value)