Interface Work
-
- All Known Subinterfaces:
WorkFlow
- All Known Implementing Classes:
ConditionalFlow,NoOpWork,ParallelFlow,RepeatFlow,SequentialFlow
public interface WorkThis interface represents a unit of work. Implementations of this interface must:- catch any checked or unchecked exceptions and return a
WorkReportinstance with a status ofWorkStatus.FAILEDand a reference to the exception - make sure the work is finished in a finite amount of time
- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description WorkReportexecute(WorkContext workContext)Execute the unit of work and return its report.default StringgetName()The name of the unit of work.
-
-
-
Method Detail
-
getName
default String getName()
The name of the unit of work. The name must be unique within a workflow definition.- Returns:
- name of the unit of work.
-
execute
WorkReport execute(WorkContext workContext)
Execute the unit of work and return its report. Implementations are required to catch any checked or unchecked exceptions and return aWorkReportinstance with a status ofWorkStatus.FAILEDand a reference to the exception.- Parameters:
workContext- context in which this unit of work is being executed- Returns:
- the execution report
-
-