Every AppServer client automatically generates a 22-character, Base64-encoded UUID value for this property as an initial value when the client creates the Server object handle for the AppServer (using the CREATE SERVER statement). This initial value is generated regardless of the operating mode of the AppServer and is used to set the ClientContextId property on the Progress.Lang.OERequestInfo instance referenced by the REQUEST-INFO attribute on the server object handle.
The client sends the value of this property to the AppServer when it connects to the AppServer using the CONNECT( ) method (AppServer) on the server handle and when it calls a remote external procedure using the RUN statement. The AppServer session can then retrieve this value by reading this property on the Progress.Lang.OERequestInfo instance referenced by the on the SESSION system handle.
You can also customize the behavior of this setting. In the:
Client session
You can set a custom CCID value for this property referenced through the REQUEST-INFO attribute both before connecting the AppServer and before calling a remote external procedure.
You can terminate any further transmission of this property value to the AppServer by setting the Unknown value (?) for this property referenced through the REQUEST-INFO attributebefore making any remote external procedure calls to the AppServer.
AppServer session
You can have the AppServer set a custom CCID value for this property on the Progress.Lang.OERequestInfo instance referenced through the CURRENT-RESPONSE-INFO attribute on the SESSION system handle before the end of the current AppServer request. Then the client returns the AppServer custom value to the AppServer when running subsequent remote requests.
You can terminate any further transmission of this property value to the AppServer from the client by setting the Unknown value (?) for this property referenced through the CURRENT-RESPONSE-INFO attribute on the SESSION system handle before the end of the current AppServer request.
When setting a custom CCID value for this property, you can use the following assignment to obtain a 22-character, Base64-encoded UUID value:
DEFINE VARIABLE ccid AS CHARACTER NO-UNDO.
ccid= SUBSTRING(BASE64-ENCODE (GENERATE-UUID), 1, 22).
However, you only need to use a non-blank character string with enough uniqueness to satisfy the requirements of your application architecture.
In whatever way an initial or new CCID value for this property is set, during each client request to the AppServer, the current value is automatically copied from the OERequestInfo instance referenced by the CURRENT-REQUEST-INFO attribute on the AppServer's SESSION handle to the instance reference by the CURRENT-RESPONSE-INFO attribute and returned to the client using the instance referenced by the RESPONSE-INFO attribute on the client's server object handle (or for an asynchronous request, on the asynchronous request object handle available in the asynchronous event procedure), which is then automatically copied to the instance referenced by the REQUEST-INFO attribute on the client's server object handle when the client makes its next remote request.
So, at any point in this round trip, a new value can be set through the AppServer's CURRENT-RESPONSE-INFO attribute before the request ends, or through the client's REQUEST-INFO attribute before the client's next remote request begins, and the new value continues its journey between client and AppServer and back, again, with each request.
Notes
For each of the handle attributes that reference an instance of Progress.Lang.OERequestInfo, the attribute actually references this object as a Progress.Lang.Object. Therefore, you must cast the object reference down to a Progress.Lang.OERequestInfo in order to reference the object's OERequestInfo class properties.
This property value is available on each HTTP(S) request to the AppServer Internet Adapter (AIA). However, Progress Software recommends that the client and AppServer code use the default CCID value (without customization).
If you want an AppServer session running a client request to use the client's CCID value to connect and make remote requests as an AppServer client to yet another AppServer, you must assign the ClientContextId property available through the REQUEST-INFO attribute on the server object handle for the other AppServer to the value of the ClientContextId property available through the CURRENT-REQUEST-INFO attribute on the SESSION handle for the current AppServer session.
This property works equally well for both the session-managed and session-free AppServer application models.