Method
POST
POST /decision-definition/key/{key}/evaluate
(evaluates the latest version of the decision definition which belongs to no tenant)
POST /decision-definition/key/{key}/tenant-id/{tenant-id}/evaluate
(evaluates the latest version of the decision definition for tenant)
Parameters
A JSON object with the following properties:
|value|The variable's value. For variables of type , the serialized value has to be submitted as a String value.
For variables of type File
the value has to be submitted as Base64 encoded string.
|type|The value type of the variable.|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object
, the following properties can be provided:
- objectTypeName: A string representation of the object's type name.
filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
- mimetype: The MIME type of the file that is being uploaded.
- encoding: The encoding of the file that is being uploaded.
|Name|Description
|——-
|value|The variable's value. For variables of typeObject
, the serialized value has to be submitted as a String value.
For variables of typeFile
the value has to be submitted as Base64 encoded string.
|type|The value type of the variable.
|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object
, the following properties can be provided:
- objectTypeName: A string representation of the object's type name.
serializationDataFormat: The serialization format used to store the variable.
For serialized variables of type , the following properties can be provided:- mimetype: The MIME type of the file that is being uploaded.
- encoding: The encoding of the file that is being uploaded.
Result
A JSON array representing the result of the newly evaluated decision. The array contains the output values as key-value pairs. Each key is an output name and each value an output value object that has the following properties:
- objectTypeName: A string representation of the object's type name.
- serializationDataFormat: The serialization format used to store the variable.
See the user guide for details about the decision result.
Example
POST /decision-definition/aDecisionDefinitionId/evaluate
POST /decision-definition/key/aDecisionDefinitionKey/evaluate
Request body:
[
{
"result": { "value" : "management", "type" : "String", "valueInfo" : null }
]