Repository navigation
Bidirectional linking of workflows through activity #12171
bergundy
started this conversation in
Temporal SDKs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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(andRespondActivityTaskCompletedByIdAPIs to accept links.There should also be a server / SDK side config to limit the number of links tracked by a single activity.
All reactions