Post Local Case Execution Variable (Binary)
Sets the serialized value for a binary variable or the binary value for a file variable.
Method
POST /case-execution/{id}/localVariables/{varName}/data
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the case execution to set the variable for. |
varName | The name of the variable to set. |
Request Body
For binary variables a multipart form submit with the following parts:
Form Part Name | Content Type | Description |
---|---|---|
data | application/octet-stream |
The binary data to be set. For |
valueType | text/plain | The name of the variable type. Either Bytes for a byte array variable or File for a file variable. |
data | application/json |
Deprecated: This only works if the REST API is aware of the involved Java classes.
A JSON representation of a serialized Java Object. Form part |
type | text/plain |
Deprecated: This only works if the REST API is aware of the involved Java classes.
The canonical java type name of the variable to be set. Example: |
Result
This method returns no content.
Response Codes
Code | Media type | Description |
---|---|---|
204 | Request successful. | |
400 | application/json | The variable value or type is invalid, for example if no filename is set. See the Introduction for the error response format. |
Example
Request
(1) Post binary content of a byte array variable:
POST /case-execution/aCaseExecutionId/localVariables/aVarName/data
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y
Content-Disposition: form-data; name="data"; filename="unspecified"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
<<Byte Stream ommitted>>
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y
Content-Disposition: form-data; name="valueType"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
Bytes
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--
(2) Post the JSON serialization of a Java Class (deprecated):
POST /case-execution/aCaseExecutionId/localVariables/aVarName/data
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y
Content-Disposition: form-data; name="data"
Content-Type: application/json; charset=US-ASCII
Content-Transfer-Encoding: 8bit
["foo", "bar"]
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y
Content-Disposition: form-data; name="type"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
java.util.ArrayList<java.lang.Object>
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--
(3) Post a text file:
POST /case-execution/aCaseExecutionId/localVariables/aVarName/data
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y
Content-Disposition: form-data; name="data"; filename="myFile.txt"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: binary
<<Byte Stream ommitted>>
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y
Content-Disposition: form-data; name="valueType"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
File
---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--