# How to get the status of temporal workflow

**URL:** <https://community.temporal.io/t/how-to-get-the-status-of-temporal-workflow/2946>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [September 16, 2021, 8:33pm UTC](https://community.temporal.io/t/how-to-get-the-status-of-temporal-workflow/2946 "2021-09-16T20:33:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkatre](https://avatars.discourse-cdn.com/v4/letter/n/d6d6ee/32.png) [@nkatre](https://community.temporal.io/u/nkatre)\
**Post date:** [September 16, 2021, 8:33pm UTC](https://community.temporal.io/t/how-to-get-the-status-of-temporal-workflow/2946/1 "2021-09-16T20:33:36Z")

</div>

Hello,

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…)

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [September 16, 2021, 10:06pm UTC](https://community.temporal.io/t/how-to-get-the-status-of-temporal-workflow/2946/2 "2021-09-16T22:06:23Z")

</div>

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](https://docs.temporal.io/docs/java/queries) 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](https://github.com/temporalio/sdk-java/blob/30420212a26283cf7cbe6339512058a3186074e8/temporal-sdk/src/main/java/io/temporal/client/WorkflowStub.java#L89) API.
- If you want to check the workflow status only then use [DescribeWorkflowExecution](https://github.com/temporalio/api/blob/760fa1278ece08707f05b8937cc0b9c4c926eb6c/temporal/api/workflowservice/v1/service.proto#L272) API.
