Calling Gateway Script

I have a few tags that have value-changed script and I’m calling a gateway script, call it ‘afunc’, in the value-changed script.

Would there be a problem if 2 or more tags call ‘afunc’ at the same time?

Does ignition support recursive or does it block further execution and wait until it exits currently running execution?

Events are queued and scripts are run one after other after completion of each execution

This is true when it’s the same tag changing.

If multiple tags change but each of their tag scripts calls afunc then it will be potentially be executing simultaneously from up to 3 different threads. This is generally fine.

Oh, that’s a learning for me! Thanks for the update. Does that mean all events are handled by separate threads? Quite possible in Java.

Tag scripts are executed on a fixed size (3) thread pool. Each tag has its own queue for script executions (default size 5) that it execute scripts on.

So for any given tag its tag script won’t ever be executing simultaneously, but other tag scripts might be.

hmm… pretty complex, but one should know this so that we don’t get unexpected behavior from our scripts. I guess for client event scripts, handling may be different.