Getting workflow status/results with just the workflow/run id in a different client

Hi all,

I’ve been looking for a way to query a workflow (running/completed) from a separate client.
So far I’ve only seen examples that start and query from within the same program.
Is there any standalone example showing how to query a workflow using just the workflow id and run id?

how to query a workflow using just the workflow id and run id

// using typed stub
MyWorkflow workflow =
  client.newWorkflowStub(MyWorkflow.class,"<workflowId>", Optional.of("<runid">));
WorkflowStub.fromTyped(myWorkflow).query(...);

// untyped stub
WorkflowStub stub =
  client.newUntypedWorkflowStub("<workflowid>", Optional.of("<runid>"), Optional.empty());
stub.query(...);

Hope this helps

Worked like a charm. Thanks!

Can you please help me how we can do the same in the typescript. I didn’t find any relevant methods in the documentation

Hi, responded in your separate thread here