Workflow Interface

Workflow encapsulates the orchestration of activities and child workflows. It can also answer synchronous queries and receive external events (also known as signals).

A workflow must define an interface class. All of its methods must have one of the following annotations:

You can have more than one method with the same annotation (except @WorkflowMethod). For example:

public interface FileProcessingWorkflow {

    @WorkflowMethod(executionStartToCloseTimeoutSeconds = 10, taskList = "file-processing")
    String processFile(Arguments args);

    List<String> getHistory();

    String getStatus();

    void retryNow();
    void abandon();

We recommended that you use a single value type argument for workflow methods. In this way, adding new arguments as fields to the value type is a backwards-compatible change.