Package org.kie.server.client
Interface DMNServicesClient
-
- All Known Implementing Classes:
DMNServicesClientImpl
public 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 dmnContextorg.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 dmnContextorg.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 dmnContextorg.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 contextorg.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 containerorg.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 modelnamespace
- namespace to identify the model to evaluatemodelName
- model name to identify the model to evaluatedmnContext
- 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 modelnamespace
- namespace to identify the model to evaluatemodelName
- model name to identify the model to evaluatedecisionName
- the root decision to evaluate, identified by namedmnContext
- 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 modelnamespace
- namespace to identify the model to evaluatemodelName
- model name to identify the model to evaluatedecisionId
- the root decision to evaluate, identified by IDdmnContext
- 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 methodevaluateAll(String, String, String, DMNContext)
shall be used for containers deploying multiple DMN model.- Parameters:
containerId
- the container id deploying the DMN modeldmnContext
- 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 modelnamespace
- namespace to identify the model to evaluatemodelName
- model name to identify the model to evaluatedecisionServiceName
- the Decision Service namecontext
- the context with all the required inputs (inputData and inputDecision) required by the Decision Service- Returns:
- the result of the evaluation
-
-