Hi,
I’ve the following process definition which manipulates a JSON object and then prints the manipulated value before and after a user task. I’m not sure, if this is an issue or if this is the expected behavior!? But after the user task the value which is printed is the unmodified(original) value whereas the value which is printed before the user task is the modified value. I know that the user task commits the transaction because the user task is a wait state. But what I do not understand is, why the manipulated value is not committed to the database?
Task: Create JSON
S(JSON.stringify({"value": 1}));
Task: Manipulate JSON
data.prop("value", 2)
Task: Show JSON before UserTask
data.prop("value")
Task: Show JSON afterUserTask
data.prop("value")
If I override the variable in the task which manipulates the value, then all works as expected and the printed values are the same. But if I only modify the referenced variable, then the printed values are not the same.
Cheers,
Christian