Note: Usage options

A SRVROUTINE is an entry point into a Server Module. Server Modules may contain one or more SRVROUTINEs and the name of the SRVROUTINE must be unique within the Server Module.

SRVROUTINEs can be defined anywhere inside the BEGIN_COM/END_COM block in your Server Module, although they are typically placed after the declaration of global variables.

Most SRVROUTINE commands are followed by the definition of one or more parameters for input and/or output, defined by the FIELD_MAP, GROUP_MAP and LIST_MAP commands. These commands define the signature of the routine.

A SRVROUTINE is executed by defining an instance of the routine in the component where it is to be used, and then invoking the Execute or ExecuteAsync methods.  

By default, all SRVROUTINEs generate output as JSON. This is mapped seamlessly into the fields and lists associated with the routine.

Also See

7.119.1 SRVROUTINE Parameters

7.119.2 SRVROUTINE Examples




    SRVROUTINE --- NAME ------- Name of SRVROUTINE --------------->    






               >-- DESC ------- Description of routine ----------->     


               >-- RESPONSE --- *DATA ---------------------------->     




                                Response Variable (LOB)


               >-- SESSION ---- *NONE ---------------------------->     



               >-- HELP ------- Help Text ------------------------>