Page 1 of 1

getGlobalData with lock

Posted: Tue Aug 23, 2022 11:15 pm
by gtflip
I call this code in flowStartTriggered() which throws an exception "Token is already locked"

Code: Select all

const data = await s.getGlobalData(Scope.FlowElement, tag, true);
Given that it's the very first code run when the flow is activated, I don't understand why it would be locked.

I'm using Switch 2021 Fall

Re: getGlobalData with lock

Posted: Wed Aug 24, 2022 8:22 am
by freddyp
Do you have more than one instance of that script in the same flow? The scope is FlowElement which means that having multiple instances in the same flow should not have an impact because each instance will have its own global data, but perhaps it is a bug? Try with another tag name as well to see if it returns an empty string.