Can a second copy of a script be started before the original copy completes?

I have a script that is triggered by the handshake tag coming from a Transaction group. The script gathers data, triggers the Transaction group again and then does some housekeeping.

It loops thru this process until all data has been processed.

What I want to know is what would happen if the trigger tag for a script is set while the script is running.

Would a second instance of the script be started before the original instance completes?

I believe this is possible. You can check the running scripts section of the gateway and test it to see.

What mechanism are you using to run the script? Tag event script? Gateway tag change script? Something else?

Not for the same tag, nor for any tags in the same gateway tag change event.

I am triggering the script with a tag event, with the tag being the handshake tag from the Transaction Group.

Correction- I am triggering the script with a gateway event tag change script.

So, no. It will not trigger in parallel. However, there's nothing in the scripting subsystem that will keep the transaction group from running again, and that will queue a tag change event to be processed when the running event finishes.

In cases where I need scripting to participate in a process, I move the entire transaction group's functionality to the script. Trigger the whole script with the TG's original trigger, not with any TG completion tag.

1 Like

What Phil just said.

1 Like

Basic procedure to use if converting a TG to a script:

Thanks for the feedback. I am glad that I do not have top worry about simultaneous execution of the same script.
I am using an integer as the trigger to the transaction group, incrementing it's value by 1 for each execution, with the stored procedure Transaction group set to execute once while trigger is active. It works very well.