Search found 3 matches

by gtflip
Tue Aug 23, 2022 11:15 pm
Forum: Node.js scripting
Topic: getGlobalData with lock
Replies: 1
Views: 2649

getGlobalData with lock

I call this code in flowStartTriggered() which throws an exception "Token is already locked" 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 202...
by gtflip
Tue Aug 16, 2022 6:47 pm
Forum: Node.js scripting
Topic: flowStartTriggered doesn't seem to be called
Replies: 2
Views: 2676

Re: flowStartTriggered doesn't seem to be called

freddyp wrote: Tue Aug 16, 2022 5:58 pm What version of Switch are you using? flowStartTriggered was introduced in Switch 2022 Spring.
Oh, I'm using 2021 Spring. It is in the Switch 2021 Fall reference, though, which I was looking at by mistake.

Thanks,

Phillip
by gtflip
Tue Aug 16, 2022 4:47 pm
Forum: Node.js scripting
Topic: flowStartTriggered doesn't seem to be called
Replies: 2
Views: 2676

flowStartTriggered doesn't seem to be called

I have the following in my script, but flowStartTriggered doesn't seem to be called. timerFired and jobArrived are called, though. async function flowStartTriggered(s: Switch, flowElement: FlowElement): Promise<void> { await flowElement.log(LogLevel.Info, "in flowStartTriggered"); } I have...