Gateway event script sometimes fails to execute a function

I’ve got to agree with this. From a users perspective, runNamedQuery() is unnecessarily quirky.