How to find which workflow spawned an activity?

I see a stray activity that seems impossible…

Want to know which workflow spawned it. How do I do it?

You can see pending activities via tctl:

tctl wf desc -w <wfid> -r <runid> | jq .pendingActivities

Or via the DescribeWorkflowExecution api.

If you know which namespace the workflow was started in and its type you could write some code to list all workflows of that type that have pending activities, not sure which SDK you are using but here is example of this using Java SDK.
This should narrow down your search, hope it helps.

1 Like

Every SDK provides Activity.GetInfo call that returns information about activity including WorkflowId of the workflow that invoked it.

1 Like