Connect( ) method

Establishes a session for a user on a Business Process Server (BP Server), or provides a user access to a session that has already been established. This session will be on the server that was defined by the connection string passed to the constructor for the associated Progress.BPM.UserSession object.

Use this set of Connect( ) method overloads to connect a user to a BP Server. This method establishes a connection to a BP Server for a user. For a new connection, pass in the user name and password. You can also use a client-principal object for a new connection. If the connection succeeds, a sealed client-principal object will be created containing the username and SessionID value. The domain name of the user will be set to "bpm" and the login-state of the client-principal will be set to "SSO". The returned unique SessionId property value is set on the UserSession object. To re-connect to an existing session, pass in your unique SessionId value.

Return type: LOGICAL

Access: PUBLIC

Applies to: Progress.BPM.UserSession class

Syntax

Connect ( INPUT username AS CHARACTER,
          INPUT password AS CHARACTER )

Connect ( INPUT hCP as HANDLE )

Connect ( INPUT session-id AS CHARACTER )
username
The name of the user for whom the connection will be established. The user must have a valid account on the BP Server in order to connect.
password
The user's password.
hCP
The handle to a client-principal object. Establishes a session to the BP Server using the client-principal object as container for user credentials. The client-principal object holds the credentials of the user logging-in to the BP Server. The BP Server will process the request based on the login-state of the client-principal object.
session-id
Identifies the session associated with a connection made to an BP Server on behalf of a specific user. This is the value of the SessionId property on an already connected UserSession object.

If the method succeeds, it returns TRUE and sets the SessionId property. If the method fails, it raises a BPM error.

A UserSession object that already has a valid connection (and has not subsequently disconnected) raises an OpenEdge error when Connect( ) is called, and the connection will remain unchanged. A UserSession object becomes disconnected when it calls Disconnect( ) or when it encounters a communication error attempting to access its associated Business Process Server.

See also

Disconnect( ) method (Progress.BPM.UserSession), GetClientPrincipal( ) method (Progress.Lang.OERequestInfo)