Task tags: Using tags for related tasks

Overview

A tag is simply a string that is attached to the task when it is created. Since the tasks for each session can come from different user requests, the tasks that belong to a particular request can be identified by their tags. The task tag can later be used to filter only those tasks that share the given tag.

Task tag APIs

The client application is responsible for generating the task tag. The tag, which can be up to 128 characters in length, is limited to alphanumeric, hyphen, and underscore characters. Note that the task tag cannot begin with a hyphen.

The task tag is set in the TaskSubmissionAttributes object, which is passed as an input parameter to the sendTaskInput() method. The following code samples demonstrate the use of the task tag for each of the supported programming languages. For more details, refer to the API reference documentation.

C++

            // Create a message
            char hello[] = "Hello Grid !!";
            MyMessage inMsg(taskCount, true, hello);
            // Create task attributes
            TaskSubmissionAttributes attrTask;
            attrTask.setTaskInput(&inMsg);
            attrTask.setTaskTag("TaskTagHere");
            // send it
            TaskInputHandlePtr input = sesPtr->sendTaskInput(attrTask); 

Java

            // Create a message
            MyInput myInput = new MyInput(taskCount, "Hello Grid !!");
            // Set task submission attributes
            TaskSubmissionAttributes taskAttr = new TaskSubmissionAttributes();
            taskAttr.setTaskInput(myInput);
            taskAttr.setTaskTag("TaskTagHere");
            // Send it
            TaskInputHandle input = session.sendTaskInput(taskAttr); 

C# (.NET)

            // Create a message
            MyMessage inputMessage = new MyMessage(taskCount, true, "Hello Grid !!");
            // Set task submission attributes
            TaskSubmissionAttributes taskAttr = new TaskSubmissionAttributes();
            taskAttr.SetTaskInput(inputMessage);
            taskAttr.TaskTag = "TaskTagHere";
            // Send it
            TaskInputHandle input = session.SendTaskInput(taskAttr); 

Querying and displaying related tasks

Actions that query and display related tasks can be performed by supplying the task tag or wildcard characters via the command line interface. Refer to Symphony Reference documentation for more information on the commands that accept the task tag as a filter.

The task 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.