Package org.kie.server.client.impl
Class DMNServicesClientImpl
- java.lang.Object
-
- org.kie.server.client.impl.AbstractKieServicesClientImpl
-
- org.kie.server.client.impl.DMNServicesClientImpl
-
- All Implemented Interfaces:
DMNServicesClient
public class DMNServicesClientImpl extends AbstractKieServicesClientImpl implements DMNServicesClient
-
-
Field Summary
-
Fields inherited from class org.kie.server.client.impl.AbstractKieServicesClientImpl
BYPASS_AUTH_USER, classLoader, config, loadBalancer, marshaller, owner
-
-
Constructor Summary
Constructors Constructor Description DMNServicesClientImpl(KieServicesConfiguration config)
DMNServicesClientImpl(KieServicesConfiguration config, ClassLoader classLoader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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>
evaluateDecisions(String containerId, org.kie.server.api.model.dmn.DMNContextKS payload)
Please notice this method is NOT exposed to the API interface.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)
Evaluate the Decision Service identified by the given name, given the contextstatic BigDecimal
getBigDecimalOrNull(Object value)
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 containerorg.kie.dmn.api.core.DMNContext
newContext()
Creates a new empty DMNContext-
Methods inherited from class org.kie.server.client.impl.AbstractKieServicesClientImpl
buildQueryString, checkResultType, close, createExceptionForUnexpectedResponseCode, deserialize, encode, executeJmsCommand, executeJmsCommand, executeJmsCommand, executeJmsCommand, getAdditionalParams, getConversationId, getHeaders, getLoadBalancer, getMediaType, getMessage, getPagingQueryString, getResponseHandler, getSortingQueryString, getUserAndAdditionalParam, getUserAndAdditionalParams, getUserAndPagingQueryString, getUserQueryStr, getUserQueryStr, initializeURI, invoke, makeBackwardCompatibleHttpPostRequestAndCreateServiceResponse, makeBackwardCompatibleHttpPostRequestAndCreateServiceResponse, makeBackwardCompatibleHttpPostRequestAndCreateServiceResponse, makeHttpDeleteRequestAndCreateCustomResponse, makeHttpDeleteRequestAndCreateServiceResponse, makeHttpGetRequestAndCreateCustomResponse, makeHttpGetRequestAndCreateCustomResponseWithHandleNotFound, makeHttpGetRequestAndCreateRawResponse, makeHttpGetRequestAndCreateRawResponse, makeHttpGetRequestAndCreateServiceResponse, makeHttpPostRequestAndCreateCustomResponse, makeHttpPostRequestAndCreateCustomResponse, makeHttpPostRequestAndCreateCustomResponse, makeHttpPostRequestAndCreateServiceResponse, makeHttpPostRequestAndCreateServiceResponse, makeHttpPostRequestAndCreateServiceResponse, makeHttpPostRequestAndCreateServiceResponse, makeHttpPostRequestAndCreateServiceResponse, makeHttpPostRequestAndCreateServiceResponse, makeHttpPutRequestAndCreateCustomResponse, makeHttpPutRequestAndCreateCustomResponse, makeHttpPutRequestAndCreateServiceResponse, makeHttpPutRequestAndCreateServiceResponse, newRequest, safeList, safeMap, sendTaskOperation, sendTaskOperation, serialize, setOwner, setResponseHandler, shouldReturnWithNullResponse, throwExceptionOnFailure
-
-
-
-
Constructor Detail
-
DMNServicesClientImpl
public DMNServicesClientImpl(KieServicesConfiguration config)
-
DMNServicesClientImpl
public DMNServicesClientImpl(KieServicesConfiguration config, ClassLoader classLoader)
-
-
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 interfaceDMNServicesClient
- 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 methodDMNServicesClient.evaluateAll(String, String, String, DMNContext)
shall be used for containers deploying multiple DMN model.- Specified by:
evaluateAll
in interfaceDMNServicesClient
- 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
-
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 interfaceDMNServicesClient
- 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
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 interfaceDMNServicesClient
- 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
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 interfaceDMNServicesClient
- 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
-
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 interfaceDMNServicesClient
- 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 namedmnContext
- 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 interfaceDMNServicesClient
- Returns:
- a new empty DMNContext
-
getBigDecimalOrNull
public static BigDecimal getBigDecimalOrNull(Object value)
-
-