endSession
endSession(String
sessionID)

The endSession method marks the end of the runtime session. When the runtime server receives this method, the runtime server logs to history, clears memory, and so on.

*
sessionID — Unique string identifying the session.

If the endSession method is not called, runtime sessions timeout. The timeout period is configurable with the sessionTimeout property.

Return value

The runtime server responds to the endSession method with the Response object with the following attributes populated:

*
*
*
*
Example

The following example shows the endSession method and how you can parse the response. sessionId is the same string to identify the session used by the startSession call which started this session.

response = api.endSession(sessionId);
// check if response is successful or not
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("endSession call processed with no warnings or errors");
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("endSession call processed with a warning");
}
else
{
System.out.println("endSession call processed with an error");
}
// For any non-successes, there should be advisory messages explaining why
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("endSession",
response.getAdvisoryMessages());


IBM Unica Interact
 
8.5.0
For more information, see our support and community site: Customer Central