New in 0.16.0

v0.16.1

Playbook

Forwarding Workflow's Tags To Services

The code examples for pages in this section are available on Github.

When dispatching a workflow, you can associate tags with it. These tags can be useful for categorization, filtering, or tracking purposes.

Setting Tags on Workflows

Here's how to set tags when creating a workflow:

Important: Tags are not automatically forwarded from workflows to tasks by default.

Forwarding Workflow Tags to Tasks

To forward tags from a workflow to its tasks, you need to explicitly pass them when creating a service stub within your workflow implementation:

By using getTags() (Java) or tags (Kotlin) when creating the service stub, you ensure that all tags associated with the workflow are forwarded to the tasks executed by this service. You can still add additional tags to your tasks if needed.

Benefits of Forwarding Tags

Forwarding tags from workflows to tasks can be beneficial for several reasons:

  • Consistent tracking across the entire process
  • Easier debugging and log analysis
  • Improved filtering capabilities in monitoring tools

By following this simple pattern, you can maintain tag consistency throughout your workflow and task executions.

Previous
Forwarding Workflow Metadata To Services