Global Access Server: StartSession Workflow
The general workflow for starting a remote session on an Axeda eMessage agent through Axeda or ThingWorx GAS and the ThingWorx Platform follows:
1. User steps:
a. Before calling the StartSession service on an eMessage Thing, a user must check that the Thing implements the GASRemoteAccessible Thing Shape.
b. Next, the user must set the providerName property on the Thing to the name of an existing GASRemoteAccessProvider Thing. Once the provider has been defined, remote sessions can be started without having to set this property again.
c. The user can then call the StartSession service on the eMessage Thing.
* 
The GASRemoteAccessible Thing Shape also defines the endpoints property that stores a list of RemoteEndpoint objects that are supported by the eMessage Agent. For example, the Agent may be configured for remote desktop sessions such as Axeda Desktop Server/Viewer, or for remote application sessions such as SSH or Telnet. Each RemoteEndpoint defines a providerConfig that can contain an array of ConnectionInformation fields. If an Axeda eMessaage agent has been configured to support remote sessions, it will send endpoint and connection details when it registers with the eMessage Connector.
For more information about the StartSession service and its parameters, refer to StartSession Service.
2. The GASSelector Thing selects a GAS server. If the GAS Thing is not found, an error is returned. If it is found, the StartSession service on that GAS Thing is called. This service returns a session ID for the remote session.
3. The StartSession service also sets the following fields for the remote session:
Field
Value
sessionId
The generated session ID.
status
INITIALIZING
createdBy
The user name returned by CurrentSessionInfo.GetCurrentUser()
agentDevice
The name of the Thing that was passed in as a parameter for the remote session.
remoteServer
me.name (the host name of the GAS Thing)
parameters
RemoteSessionParameters
4. Next the StartRemoteSession request is forwarded to one — and only one — eMessage Connector.
5. The handler for remote sessions parses and validates the parameters for the remote session. As long as validation passes, the request to start a session is sent to GAS. The GAS response is validated, and a success of failure message is returned. At this point, the original StartRemoteSession request is complete. The status of the remote session is updated to CREATED.
Was this helpful?