Skip to content

Task Keys

About

A task key is an identifier for the task which is unique across all workflow definitions. Once you have saved your task with your key you will not be able to edit this key again.

Formatting Rules

There are a number of formatting rules which are set out which you must follow. They are as follows:

  • Only contains lowercase letters, numbers and dashes, e.g. key-123.
  • Starts with a letter e.g. 123-key will not be valid but key-123 will be.

Duplicate Key Rules

As mentioned above, the key is unique across all workflow definitions. An example of this is as follows:

Let's say we want to create a workflow definition with 2 tasks. We assign a key of task-key-1 to the first task and task-key-2 to the second task. This would be valid. If we then wanted to create a third task for this workflow definition but also assign task-key-1 as the key to this third task then we would get an error as this key has already been used.

Taking this example, if we instead wanted to create another new workflow definition with only one task with a key of task-key-1 we would also see an error. Even though this key would be unique for this particular workflow definition, it has already been used in another separate workflow definition.

Finally, the only time where you will see the key used more than once for a workflow definition is when you have multiple versions. If you take the first example again where we have two tasks, one with the key task-key-1 and one with the key task-key-2, and then create a new version of this workflow, we would not see an error. Version one of the workflow definition will have two tasks, both with the same keys as the two tasks in version two.