Hello everybody,
I have a process-wide compex data object saved as process-instance variable named “processData” of type json (stored using JavaDelegate as JsonNode). Initial value looks like this:
{
"customerNumber": 123456,
"addresses": []
}
Then I have a ExecutionListener for some service-task which loads addresses.
Execution listener has a outout parameter addresses
(L-Value expression) like this: ${processData.addresses}.
In the java implementation of this listener I set the output value like this: addressesExpression.setValue(addressesValue, execution)
I experience here several problems:
-
Does not matter which java type I use for addressesValue (JsonNode, List, List, String) the value is injected into processData.addresses as string with all json escaped. So I do not have a json but a string.
-
Flowable process engine does not recognized changes in the
processData
, so it does not store the changes in DB. It is possible to accessprocessData.addreses
until transaction boundery (user task, async task). After it the “processData” is reset to its initial value (the value it was stored for the first time).
Is that a bug or is there a way do it right?