getGlobalData with lock

Post Reply
gtflip
Newbie
Posts: 3
Joined: Fri Jul 16, 2021 9:49 pm

getGlobalData with lock

Post 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
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: getGlobalData with lock

Post 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.
Post Reply