Amazon Simple Workflow Service
Developer Guide (API Version 2012-01-25)

Amazon Simple Workflow Service Tagging

As described in the section Tags, you can associate up to five tags with a workflow execution when you start the execution using the StartWorkflowExecution action, StartChildWorkflowExecution decision, or ContinueAsNewWorkflowExecution decision. Tagging enables you to filter your results when you use visibility actions to list or count workflow executions.

To use tagging

  1. Devise a tagging strategy. Think about your business requirements and create a list of tags that are meaningful to you. Determine which executions will get which tags. Even though an execution can be assigned a maximum of five tags, your tag library can have any number of tags. Because each tag can be any string value up to 256 characters in length, a tag can describe almost any business concept.

  2. Tag an execution with up to five tags when you create it.

  3. List or count the executions that are tagged with a particular tag by specifying the tagFilter parameter with the ListOpenWorkflowExecutions, ListClosedWorkflowExecutions, CountOpenWorkflowExecutions, and CountClosedWorkflowExecutions actions. The action will filter the executions based on the tags specified.

When you associate a tag with a workflow execution, it is permanently associated with that execution, and can't be removed.

You can specify only one tag in the tagFilter parameter with ListWorkflowExecutions. Also, tag matching is case sensitive, and only exact matches return results.

Assume you have already set up two executions that are tagged as follows.

Execution Name Assigned Tags


Consumer, 2011-February


Wholesale, 2011-March

You can filter the list of executions returned by ListOpenWorkflowExecutions on the Consumer tag. The oldestDate and latestDate values are specified as Unix Time values. RespondDecisionTaskCompleted { "domain":"867530901", "startTimeFilter":{ "oldestDate":1262332800, "latestDate":1325348400 }, "tagFilter":{ "tag":"Consumer" } }