How to cancel/reset workflow from Java Client?

683 Views Asked by At

I'm seeing cadence CLI supports the above commands from CLI interface.How to do this through Java SDK.I'm seeing support only for starting the workflow.

1

There are 1 best solutions below

0
On

Cancel

You can call this RequestCancelWorkflowExecution API to cancel a workflow

Reset

You can call this ResetWorkflowExecution API to reset a workflow

However, it only support resetting by a eventId as reset point. It doesn't allow resetting by resetTypes which are supported in the CLI, until this issue is implemented.

For now, if you want to reset by resetTypes, you have to copy the logic from this CLI implementation