Retry Workflow Task

Infinitic is still in active development. Subscribe here to follow its progress.

When an error occured within the workflow definition itself, the corresponding instance is stalled. The worklow itself is executed in a special task called WorkflowTask. After having fixed the workflow definition, the instance can be resume by using:

// stub targeting a running HelloWorld workflow with a specific id
HelloWorld helloworld = client.getWorkflowById(HelloWorld.class, "05694902-5aa4-469f-824c-7015b0df906c");

// retry the workflow task for this instance
client.retryWorkflowTask(helloworld);
// stub targeting a running HelloWorld workflow with a specific id
val helloworld: HelloWorld = client.getWorkflowById(HelloWorld::class.java, "05694902-5aa4-469f-824c-7015b0df906c")

// retry the workflow task for this instance
client.retryWorkflowTask(helloworld)

We can also target workflows by tag:

// stub targeting a running HelloWorld workflow with a specific id
HelloWorld helloworld = client.getWorkflowByTag(HelloWorld.class, "foo");

// retry the workflow task for this instance
client.retryWorkflowTask(helloworld);
// stub targeting a running HelloWorld workflow with a specific id
val helloworld: HelloWorld = client.getWorkflowByTag(HelloWorld::class.java, "foo")

// retry the workflow task for this instance
client.retryWorkflowTask(helloworld)

The retryWorkflowTask method returns when the adhoc message is sent to Pulsar. We can use the retryWorkflowTaskAsync method if we want to send the adhoc message asynchronously.

Edit this page on GitHub Updated at Sun, May 22, 2022