Can we run the tctl commands in java sdk

I am trying to integrate the functionalities provided by tctl v1.17 command reference. How to do that. Any reference to those would be helpful
I want flexibility to list workflows, find by status, find by workflow id, terminate workflow based on id,…

Any class or object that I can use like .query(command I want to run)

Hello @Tallam_Hemanth

You can use the sdk directly to

  • query workflows: client.getWorkflowServiceStubs().blockingStub().listWorkflowExecutions()
  • terminate: client.getWorkflowServiceStubs().blockingStub().terminateWorkflowExecution()

And similar operations you do from tcld,


1 Like

Hi @antonio.perez
Thanks, it is working. can I filter based on workflow status like running, completed, terminated or canceled.

and also example to terminate workflow with its workflow id, I was not able to create TerminateWorkflowExecutionRequest.

I would also like to know, how to fetch details of a particular workflow, what all activities were done their status all which we can see on temporal UI