EndFunction

Metreos.ApplicationControl.EndFunction

Summary

EndFunction informs the Application Runtime Environment to end the current function.

Usage

EndFunction causes the currently executing function to come to an end.

Functions in scripts can only execute serially; EndFunction signifies to the Application Runtime Environment that this function is done and therefore subsequent functions can now be processed. Due to this serial behavior, if a non-triggering event is routed to the script while a function is being processed, the event is queued up until EndFunction is called. To make sure events are not queued excessively and your script remains responsive for incoming events, the overriding best practice is to spend as little time in a function as possible.

If a function is invoked via CallFunction, then the custom action parameters of the EndFunction action are passed back to the to custom result data for the CallFunction action. This relationship of EndFunction action parameters and CallFunction result data is based purely on the names of the parameters; one must ensure that the name of each EndFunction custom action parameters and CallFunction result data are the same string value.

Remarks

EndFunction is an example of a final action, which means no other actions can occur after this action in the function from which it was invoked.

Action Parameters
Parameter Name.NET TypeDefaultDescription
ReturnValueSystem.StringIf a function is invoked via CallFunction, then the ReturnValue parameter is used to dictate which branch condition is taken once execution carries on past CallFunction.

No Result Data

Branch Conditions 

success

No description.

failure

No description.