How to get the status of a workflow?

I have a workflow called orderfullfilentworkflow. I have one instance of the workflow running with id
orderfullfilentworkflow-1. I need to find the status of the workflow by that id in java.

It would totally helpful if I can get some java snippet around the same to get the status of the workflow by id.

Hello @kambalavijay

Using the java-sdk you can get with DescribeWorkflowExecution,

see an example here

and then, from the response,

resp.getWorkflowExecutionInfo().getStatus()

Note that if you can set both, workflowId and runId. If you set only the workflowId DescribeWorkflowExecution will return the last execution