Get Task Variables
Retrieves all variables visible from the task. A variable is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on visiblity of variables.
Method
GET /task/{id}/variables
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the task to retrieve the variables from. |
Query Parameters
Name | Description |
---|---|
deserializeValues |
Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default true ).
If set to If set to Note: While |
Result
A JSON object of variables key-value pairs. Each key is a variable name and each value a variable value object that has the following properties:
Name | Value | Description |
---|---|---|
value | String / Number / Boolean / Object |
The variable's value. Value differs depending on the variable's type and on the deserializeValues parameter.
|
type | String | The value type of the variable. |
valueInfo | Object |
A JSON object containing additional, value-type-dependent properties.
For variables of type
|
Response Codes
Code | Media type | Description |
---|---|---|
200 | application/json | Request successful. |
500 | application/json | Task id is null or does not exist. See the Introduction for the error response format. |
Examples
Example 1
Request
GET /task/aTaskId/variables
Response
{
"aVariableKey": {
"value" : {"prop1" : "a", "prop2" : "b"},
"type" : "Object",
"valueInfo" : {
"objectTypeName": "com.example.MyObject",
"serializationDataFormat": "application/xml"
}
}
}
Example 2
Request
GET /task/aTaskId/variables?deserializeValues=false
Response
{
"aVariableKey": {
"value" : "a b ",
"type" : "Object",
"valueInfo" : {
"objectTypeName": "com.example.MyObject",
"serializationDataFormat": "application/xml"
}
}
}