start action to start a procedure for asynchronous processing. The start action schedules the specified procedure for execution; processing then continues through any remaining statements within the calling rule or procedure. At some later time, the scheduler will actually invoke the started procedure. When starting a remote procedure, because of this scheduling order, it is possible for the remote procedure to complete before the remainder of the calling rule or procedure. To invoke a procedure synchronously from a procedure, use the
call statement, as described under call.
You cannot use the
start action to obtain a return value from a procedure: any value returned by a started procedure is discarded. Use start with caution for operations such as writing to a file: by the time the started procedure executes, the data it was to write may no longer exist, or the stream it was to write to may no longer be open.
Starting a Procedure
To start a procedure:
start procedure ( [argument [ , ...] )
This example shows an action button that starts a procedure, using the
this window statement to pass the current g2-window as the single argument of the procedure.
![]() |
Starting a Procedure on a Remote G2 Process
To start a procedure on a remote G2 or G2 Gateway process:
start procedure ( [argument [ , ...] ) across {g2-to-g2-interface | gsi-interface}
![]() |
Hint: To start a procedure on a remote G2, you must declare the procedure as remote by using a remote procedure declaration. Remote procedure declarations are described in the G2 Developer's Guide.
Starting a Procedure with a Priority
To start any procedure with a non-default priority:
start procedure ( [argument [ , ...] ) at priority integer-expression
Specifying a priority overrides the default priority of the invoked procedure. Here is an example of the optional priority statement:
![]() |
Starting a Procedure after a Time Interval
To start any procedure after a time interval:
start procedure ( [argument [ , ...]) after time-interval
![]() |