I am first setting a variable “payload” and then start a user task. After completing the user task, when I access the same variable “payload” I am getting some unexpected result when printing the variable in “Get Variable” script task:
I think my question is not very clearly put. My issue is not with the user task. The issue is that, say:
I store a variable X that has value Y in the “Set Variable” script task. This value Y is stored as a SPIN object using execution.setVarable…
There is a user task in between. And a user completes this task
Now when I try to read and print the variable X in the “Get Variable” script task. I get {nodeType=OBJECT, number=false, value=false, string=false, object=true, dataFormatName=application/json, boolean=false, array=false, null=false} instead of Y
This issue happens only when the data is stored as a SPIN object and is fetched after a user task. For eg. if I remove the user task from the sample WF then I get the correct value Y in “Get Variable” script task