Skip to content

Bidirectional linking of workflows through activity #12170

Closed

Description

@bergundy

Is your feature request related to a problem? Please describe.

Users often start workflows from an activity or local activity for various reasons instead of using child workflows.
The major downside to this approach is that they lose the relationship between the "parent" and "child workflows.

Describe the solution you'd like

With Nexus, we added a way to add links to history events. The approach is not specific to Nexus though and can be leveraged to link workflows started from an activity using a Temporal client.

It's debatable whether links should automatically be established when using a client from an activity or this should be opt-in.

Additional context

We may want to wait until we implement temporalio/features#203 in SDKs to provide a wrapped client that will automatically link.
Note that links are not exclusively meant for starting workflows, signals and updates can also be linked.
Links are bidirectional, which means the local activity marker event or ActivityTaskCompleted events should include a link back from any Temporal primitives initiated by the activity. We will need to change the RespondActivityTaskCompleted (and RespondActivityTaskCompletedById APIs to accept links.

There should also be a server / SDK side config to limit the number of links tracked by a single activity.

Per-SDK Tickets

  • Go -
  • Java -
  • Core -
  • TypeScript -
  • Python -
  • .NET -
  • Ruby
  • PHP -
  • Temporal CLI -

Activity

  1. changed the title [-]Bidirectional liking of workflows through activity[/-] [+]Bidirectional linking of workflows through activity[/+] on Sep 10, 2024
  2. locked and limited conversation to collaborators on Sep 18, 2026
  3. converted this issue into a discussion #12171 on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions