Using tags for related sessions

Overview

A tag is simply a string that is attached to the session when it is created. Since the running of a functional job can involve multiple sessions, a session tag that is shared among sessions provides the ability to query or control these related sessions with a single action.

This functionality not only allows you to change the priority of current sessions that share the same session tag but can also extend the priority change to future sessions. If required, this priority change for future sessions can be reset so that the priority is derived from the application profile.

Session tag APIs

The client application is responsible for generating the session tag. The tag, which can be up to 128 characters in length, is limited to alphanumeric, hyphen, and underscore characters. If it is set as an empty string, the session will not have a session tag.

The session tag is set in the SessionCreationAttributes object, which is passed as an input parameter to the createSession() method. The following code samples demonstrate the use of SessionCreationAttributes for each of the supported programming languages. A VBA sample is also included for the COM API. For more details, refer to the API reference documentation.

C++

SesssionCreationAttributes attributes;
attributes.setSessionName("mySession");
attributes.setSessionType("mySessionType");
attributes.setSessionFlags(SF_SYNC);
attributes.setSessionTag("tag");
SessionPtr sesPtr = conPtr->createSession(attributes);

Java

SessionCreationAttributes attributes = new SessionCreationAttributes();
attributes.setSessionName("mySession");
attributes.setSessionType("mySessionType");
attributes.setSessionFlags(Session.SYNC);
attributes.setSessionTag("tag");
session = connection.createSession(attributes);

C# (.NET)

SessionCreationAttributes attributes = new SessionCreationAttributes();
attributes.SessionName="mySession";
attributes.SessionType="mySessionType";
attributes.SessionFlags = SessionFlags.AliasSync;
attributes.SessionTag="tag";
session = connection.CreateSession(attributes);

VBA (COM API)

Set attributes = New CSoamSessionCreationAttributes
attributes.SessionName="mySession"
attributes.SessionType="mySessionType"
attributes.SessionFlags = SessionFlags.ReceiveSync
attributes.SessionTag="tag"
Set session = connection.CreateSession(attributes)

Querying and controlling related sessions

Actions that query and control related sessions can be performed by supplying the session tag via the command line interface. Refer to the Symphony Reference for more information on the commands that accept the session tag as a filter.

The session tag can also be supplied through the Platform management console as a filter. Refer to the online documentation provided with the management console for further information.