Skip to content

defining work

Mahmoud Ben Hassine edited this page Jun 30, 2017 · 5 revisions

The Work abstraction and its related APIs

A unit of work in Easy Flows is represented by the Work interface:

public interface Work extends Callable<WorkReport> {

    String getName();

    WorkReport call();
}

Implementations of this interface must:

  • catch exceptions and return WorkStatus#FAILED in the WorkReport
  • make sure the work in finished in a finite amount of time

A work name must be unique within a workflow. Each work must return a WorkReport at the end of execution. This report may serve as a condition to the next work in the workflow through a WorkReportPredicate.

Clone this wiki locally