cadence-client icon indicating copy to clipboard operation
cadence-client copied to clipboard

Provide workflow start time same as in Temporal GoSDK

Open longquanzheng opened this issue 2 years ago • 3 comments

Need to sync this small feature from Temporal GoSDK

It is useful to know the start time in workflow for business.

longquanzheng avatar Jan 08 '23 04:01 longquanzheng

Yeah, we were actually just discussing this lately too. Along with cron-"fired at" time.

How is it built in temporal, and which times do you use? (task-scheduled, workflow-created, cron-timer-fired-database-time, etc?) It'd be interesting for a reference at least.

Groxx avatar Mar 29 '23 19:03 Groxx

@Groxx ahh sorry for late response. I think it's the workflow created time or the first task scheduled time based on the description -- these two won't be too different to use in practice.

https://github.com/temporalio/sdk-go/blob/eaa3802876de77500164f80f378559c51d6bb0e2/internal/workflow.go#L957

longquanzheng avatar Apr 13 '23 22:04 longquanzheng

@Groxx looks like it's from the start event as I guessed: https://github.com/temporalio/sdk-go/blob/eaa3802876de77500164f80f378559c51d6bb0e2/internal/internal_task_handlers.go#L586

longquanzheng avatar Apr 13 '23 22:04 longquanzheng