How can we repeat a Workflow

Hi, We are trying to add repeat functionality on a Workflow,
For example the a previous flow send a message OK, but some child system did not works well, return an OK, but now they are asking us to repeat this Workflow.

Is there a way to repeat some Workflow with the WorkflowID?


If your first workflow completed you can start a new execution with the same workflow id. Is that the question?

The same workflow, same input, is just repeat all again

I guess you don’t want to have to start new execution and have to provide the original inputs again, that’s fair.

You could use reset feature then to reset to the first workflow task of the completed workflow. Reset will create a new execution with same workflow id (different run id) replay history up to your reset point (note that workflow execution inputs are recorded in history so they would re-applied) and then continue execution against the workflow code for this type registered on your worker(s).

So if you have workflow history like

1. WorkflowExecutionStarted
2. WorkflowTaskScheduled
3. WorkflowTaskStarted

you could reset to either events 2 or 3, for example:

tctl wf reset -w <wfid> --event_id 3 --reason "<my_reason>"