Update element instance variables
POST/element-instances/:elementInstanceKey/variables
Updates all the variables of a particular scope (for example, process instance, flow element instance) with the given variable data.
Specify the element instance in the elementInstanceKey
parameter.
Request
Path Parameters
The key of the element instance to update the variables for.
This can be the process instance key (as obtained during instance creation), or a given
element, such as a service task (see the elementInstanceKey
on the job message).
- application/json
Body
required
variables objectrequired
JSON object representing the variables to set in the element’s scope.
Additional properties allowed.
Default value: false
If set to true, the variables are merged strictly into the local scope (as specified by the elementInstanceKey
).
Otherwise, the variables are propagated to upper scopes and set at the outermost one.
Let’s consider the following example:
There are two scopes '1' and '2'. Scope '1' is the parent scope of '2'. The effective variables of the scopes are: 1 => { "foo" : 2 } 2 => { "bar" : 1 }
An update request with elementInstanceKey as '2', variables { "foo" : 5 }, and local set to true leaves scope '1' unchanged and adjusts scope '2' to { "bar" : 1, "foo" 5 }.
By default, with local set to false, scope '1' will be { "foo": 5 } and scope '2' will be { "bar" : 1 }.
Possible values: >= 1
A reference key chosen by the user that will be part of all records resulting from this operation. Must be > 0 if provided.
Responses
- 204
- 400
- 500
The variables were updated.
The provided data is not valid.
- application/problem+json
- Schema
- Example (from schema)
Schema
Default value: about:blank
A URI identifying the problem type.
A summary of the problem type.
Possible values: >= 400
and <= 600
The HTTP status code for this problem.
An explanation of the problem in more detail.
A URI identifying the origin of the problem.
{
"type": "about:blank",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
An internal error occurred while processing the request.
- application/problem+json
- Schema
- Example (from schema)
Schema
Default value: about:blank
A URI identifying the problem type.
A summary of the problem type.
Possible values: >= 400
and <= 600
The HTTP status code for this problem.
An explanation of the problem in more detail.
A URI identifying the origin of the problem.
{
"type": "about:blank",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}