HTTP Example:POST /API/runtimeAPI/setVariable/{activityUUID}
variableValue=…&variableId=…&options=…
| API Example: AbstractRemoteRuntimeAPI.setVariable({'activityUUID': , 'variableValue': , 'variableId': , 'options': }); |
Searches for variable with id variableId within the given activity instance
with the given UUID.
If the variable is found within the activity, the given value is set.
If the variable is not found within the activity the search is performed
within the process instance.
If the variable is found within the process instance, the given value is set.
For XML data
Here is the effect of set variable for XML data:
| String | Document | Element | Attribute |
| "myXmlData" |
Stores content of XML String into myXmlData |
Stores a copy of Document in myXMLData |
Not supported |
Not supported |
| "myXmlData" + {@link BonitaConstants#XPATH_VAR_SEPARATOR} + "/root/node" (or any XPath expression resolving to an element |
Creates Node from string, and replace node by new node |
Not supported |
Replace node by new element |
Adds attribute to node |
"myXmlData" + {@link BonitaConstants#XPATH_VAR_SEPARATOR} + "/root/node/text()" |
Sets text content of node |
Not supported |
Not supported |
Not supported |
| "myXmlData" + {@link BonitaConstants#XPATH_VAR_SEPARATOR} + "/root/@attribute" |
Sets the value of attribute. Create it if it does not exist |
Not supported |
Not supported |
Sets the value of attribute to the value of passed attribute |
| "myXmlData" + {@link BonitaConstants#XPATH_VAR_SEPARATOR} + "/root/node" + {@link BonitaConstants#XPATH_VAR_SEPARATOR} + {@link BonitaConstants#XPATH_APPEND_FLAG} |
Not supported |
Not supported |
Append a copy of element to node |
Not supported |
- Output:
- void
- Form parameters:
- variableValue - the variable value (can be: a plain {@link String}, a {@link Boolean},
a {@link Date}, a {@link Long}, a {@link Double}, any Java {@link Object}, or any {@link Document} element
according to the type of the variable).
- variableId - the variable id.
- options - the options map (domain, queyList, user)
- Produces:
- text/*
- application/xml
- Consumes:
- application/x-www-form-urlencoded
- application/xml
|