Interface Work
- All Known Subinterfaces:
WorkFlow
- All Known Implementing Classes:
ConditionalFlow,NoOpWork,ParallelFlow,RepeatFlow,SequentialFlow
public interface Work
This 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
Modifier and TypeMethodDescriptionexecute(WorkContext workContext) Execute the unit of work and return its report.default StringgetName()The name of the unit of work.
-
Method Details
-
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
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
-