Get WorkflowExecution Info in python client, like we have in go

So, in golang client - we can write below in “workflow” code:

execution := workflow.GetInfo(ctx).WorkflowExecution
wfId = execution.ID
runId = execution.RunID

Could not find such api in python client.

I need to know runId of a cron workflow - that I need to pass to activity

I can’t recall whether it’s there. I’m quite tight with work at the moment — might be able to get to it over the weekend.

If you like to attempt the change I think it should be fairly straightforward to implement.

I think it is not necessary to pass this info from the workflow.
We can get it in the activity itself by:

`run_id = ActivityContext.get().activity_task.workflow_execution.run_id`
1 Like

I’ll make a note to add this as as proper API.

1 Like