I probably should have figured this out sooner but when you call a function using Perform, the mainline code does not wait for completion of the called procedure.
What’s the best workaround? Setting a flag for a timer?
I ran into a condition where the mainline wouldn’t complete when a timer was used which required use of a second Perform call from the secondary function.
Well the easiest way is to have a translator that call perform.
Then the perform translator does its work and triggers a timer as an outgoing action. Within the rules of this translator you can set a global variable with the return value if you want to return something.
The final tranlator is triggered by the timer that can then read the return value (global variable) and do what it needs from there.
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
What I ended up doing was splitting the calling translator into 2 parts at the point of the call to the subroutine. I then did a Perform as the output to call the second portion serially.