GetSession flow for the MQ to Salesforce: Account Management pattern
Details about the GetSession flow for the
MQ to Salesforce: Account Management pattern.
-
Get Session first checks to see if there is already an active session: SessionSet is true.
-
If no session is set then GetSession sets up the login information which is taken from the configurable UDPs:
-
SF_BROKER_USERNAME
-
SF_BROKER_PASSWORD
-
SF_BROKER_SECTOKEN
- A service call is made to Salesforce using the login operation.
-
If a response is returned
then the the flow resets the shared session variables:
-
SessionSet: to indicate that there is an active session
-
Session: holding the session ID to be used in the SOAP header for subsequent service calls
-
ServerURL: the URL to be used for service calls within this session
-
If there is a fault, or failure then the SessionSet
variable is set to false and an exception is thrown to invoke error handling.
- The shared session variable Session is also copied to
the local environment for mapping into SOAP requests
-
The shared session variable ServerURL is also copied to
the local environment to override the target address of all further calls to Salesforce.