How to get the status of temporal workflow


I am looking for sample code/examples to know the status of a temporal workflow programmatically. User case : Started temporal workflow programmatically. How can I know its status (completed, terminated, in_progress…)

There are multiple ways to learn about the workflow state and status.

  • If you want to query workflow for its data then use the query feature. It works for completed workflows as well.
  • If you want to get the workflow result waiting for it using long poll then use GetResult API.
  • If you want to check the workflow status only then use DescribeWorkflowExecution API.