Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To cancel a workflow through a Java client, you can use the following steps:

  1. Get the WorkflowClient instance.
  2. Call the getWorkflowExecution() method on the client and pass in the workflow ID.
  3. Call the cancel() method on the WorkflowExecution instance returned by getWorkflowExecution().

To reset a workflow, you can use the following steps:

  1. Get the WorkflowClient instance.
  2. Call the getWorkflowExecution() method on the client and pass in the workflow ID.
  3. Call the signal() method on the WorkflowExecution instance returned by getWorkflowExecution().
  4. Pass in the signal name and input parameters to the signal() method.
  5. Implement a signal handler method in your workflow code to receive the signal and take appropriate action. This handler can reset the workflow by calling WorkflowClient.start() with the same input parameters used to start the workflow initially.