In addition to the standard CRUD methods, you can call custom invocation methods on a JSDO that supports them. Each invocation method corresponds to a single routine on the server that is mapped depending on the type of Progress Data Object Service.

For an OpenEdge Data Object Service, each invocation method maps to a specific ABL routine that is implemented and defined in the Data Object resource to be called using an Invoke operation.

The Data Service Catalog identifies the available Invoke operations, with their corresponding custom JSDO method and server routine mappings. Calling an invocation method on the JSDO thereby causes the corresponding routine to execute on the server.

The signature of an OpenEdge ABL routine defined to implement an Invoke operation is largely unrestricted. All input and output parameters can use any ABL data types supported by OpenEdge Data Object Services. For more information, see OpenEdge ABL to JavaScript data type mappings.

For an ABL implementation, the invocation method name can be the same as that of the ABL routine, or it can be an alias, as defined by the resource. The invocation method passes any ABL input parameters as properties of a single object parameter. The method returns results from the ABL routine, including any return value and output parameters, in the response property of a request object.

This response property references an object containing properties whose names match the names of output parameters defined in the ABL routine. Since JavaScript is case-sensitive, code that accesses the value of an output parameter must exactly match the name defined in the ABL routine. For user-defined functions and non-void ABL methods, the return value is available in the _retVal property of the response property object. This _retVal property also contains any error information returned by the server If the request fails.

Note: For an OpenEdge implementation, JSDO memory is not automatically updated with the results of an Invoke operation. To add records returned by the Invoke operation to JSDO memory, call addRecords( ) on the appropriate table.