Try OpenEdge Now
skip to main content
Developing AppServer Applications
Programming the AppServer : ABL for programming AppServer procedures
 

ABL for programming AppServer procedures

The following table lists the ABL elements that either are valid only in an AppServer session or have special application in AppServer programming. The remaining sections in this chapter explain how to use these elements.
Table 2. ABL for programming AppServer procedures
ABL element
Description
CURRENT-REQUEST-INFO
An object reference attribute on the SESSION system handle that references a Progress.Lang.OERequestInfo object, which describes the current client request being executed.
CURRENT-RESPONSE-INFO
An object reference attribute on the SESSION system handle that references a Progress.Lang.OERequestInfo object, which describes the response to the client request being executed.
DEFAULT-COMMIT
A LOGICAL attribute on a transaction object handle that specifies how the transaction object is to complete the transaction if an automatic transaction terminates with no prior SET-COMMIT( ) or SET-ROLLBACK( ) being invoked.
DELETE OBJECT handle
 
A statement that you can use to delete certain session objects, including local and remote persistent procedures.
DELETE PROCEDURE procedure-handle
 
A statement that you can use to delete both local and remote procedure objects (persistent procedures).
EXPORT ( [list] )
A method on the SESSION system handle that creates and modifies the list of remote procedures provided by the AppServer.
FUNCTION ... IN SUPER
A statement that specifies the prototype definition for a user-defined function defined within a super procedure.
IS-OPEN
A LOGICAL attribute on a transaction object handle that returns TRUE if a database transaction is active. This is identical to the ABL TRANSACTION function.
LOCAL-VERSION-INFO
An object reference attribute on the SESSION system handle that references a Progress.Lang.OEVersionInfo object, which identifies the current instance of the OpenEdge AVM, including its OpenEdge version.
Parameters for procedures and user-defined functions
Procedure and user-defined function parameters can be defined as any ABL parameter data type, including class-based object types. (For more information see Passing class-based objects as parameters between an AppServer and an ABL client.) However, note that for any procedure or user-defined function that you include in an OpenEdge Web service or Sonic ESB Adapter service, you cannot pass a static or dynamic ProDataSet parameter that includes parent-id data-relations (for example, data-relations as defined using the PARENT-ID-RELATION option of the DEFINE DATASET statement). Otherwise, ProxyGen fails to generate any proxies for the specified service definition.
PERSISTENT
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running persistently as a procedure object.
PROCEDURE ... IN SUPER
A statement that begins the prototype definition for an internal procedure defined within a super procedure.
REMOTE
A LOGICAL attribute on the SESSION system handle that is TRUE if the current session is running in the context of an AppServer.
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running at the top level in the context of an AppServer (as the result of a remote procedure call by a client application). Always FALSE if PROXY is TRUE.
SERVER-CONNECTION-BOUND
A LOGICAL attribute on the SESSION system handle that is TRUE if the AppServer agent is bound to a particular client session in stateless and state-free operating modes by client invocation of a remote persistent procedure or Open Client/Web service ProcObject. By default, it is FALSE. Valid only if the REMOTE attribute is TRUE.
SERVER-CONNECTION-BOUND-REQUEST
A LOGICAL attribute on the SESSION system handle that, when set to TRUE, requests that the AppServer agent be bound to the current client connection identified by the SERVER-CONNECTION-ID attribute. When set to FALSE, requests that the AppServer agent be unbound from the currently bound client connection pending deletion of all remote persistent procedures running in the session. Valid only if the REMOTE attribute is TRUE and the operating mode is stateless. In state-free operating mode, any attempt to set this attribute raises a WARNING condition in the AppServer agent, which writes a message to the AppServer log file, and the value remains unchanged. You can handle the WARNING condition by including the NO-ERROR option in the statement that attempts to set the value, and checking ERROR-STATUS:NUM-MESSAGES for a value greater than zero. In state-free operating mode, this attribute always has the unknown value (?).
SERVER-CONNECTION-CONTEXT
A CHARACTER attribute on the SESSION system handle that contains an application-determined value that you can set. OpenEdge passes this value to each AppServer agent that executes a request on behalf of the client connection identified by the SERVER-CONNECTION-ID attribute. Valid only if the REMOTE attribute is TRUE.
In state-free operating mode, any attempt to set this attribute raises a WARNING condition in the AppServer agent, which writes a message to the AppServer log file, and the value remains unchanged. You can handle the WARNING condition by including the NO-ERROR option in the statement that attempts to set the value, and checking ERROR-STATUS:NUM-MESSAGES for a value greater than zero. In state-free operating mode, this attribute always has the unknown value (?).
SERVER-CONNECTION-ID
A CHARACTER attribute on the SESSION system handle that returns the run-time connection ID of the current client connection assigned to this AppServer session. Valid only if the REMOTE attribute is TRUE.
In state-free operating mode, this value has no meaning.
SERVER-OPERATING-MODE
A CHARACTER attribute on the SESSION system handle that returns the operating mode specified by the operatingMode property set for this AppServer in the ubroker.properties file. Valid only if the REMOTE attribute is TRUE.
SET-COMMIT( )
A method on a transaction object handle that tells the transaction object to commit any automatic transaction when the current request completes and returns execution to the client.
SET-ROLLBACK( )
A method on a transaction object handle that tells the transaction object to roll back any automatic transaction when the current request completes and returns execution to the client.
SINGLE-RUN
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running as a single-run object.
SINGLETON
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running as a singleton object.
TRANSACTION
A HANDLE attribute on procedure handles and the THIS-PROCEDURE system handle that provides a handle to the current transaction object.
TRANS-INIT-PROCEDURE
A HANDLE attribute on a transaction object handle that, if an automatic transaction is active, returns the procedure handle to the transaction initiating procedure that started the transaction.