Hello all
I’d like to update a JSON variable belonging to a super process instance.
I’ve read a few posts which are related but not answering this specific use case:
[Multi instance parallel call activity - super execution]
[Data flow vs Workflow - #4 by thorben]
[Using setVariable with activityId - #18 by thorben]
Here is what I’d like to do:
I’d like to update a JSON variable in the Main scope, from CA (Call Activity) each time CA executes:
1 It can be done when CA terminates by defining In and Out Mappings, but I want to update the JSON mid-execution of CA.
2 Thanks to @thorben, I tried using execution.setVariable(“Var”,“Val”,“Id”), where Id is Main, but it appears that this does not work for process IDs beyond the scope of CA? Maybe I’m wrong, but I cannot get it to work. I presume it’ll work for normal Sub-Processes but not Call Activities?
3 Thanks to @hassang, I can access the JSON variable from CA (without mapping it) with getVariable(execution.getSuperExecution().getId(), “json”); but I’m looking for similar functionality for setting / updating the variable.
Any ideas?
Thanks so much.