Class ConditionalFlow
- java.lang.Object
-
- com.redhat.parodos.workflows.workflow.ConditionalFlow
-
public class ConditionalFlow extends Object
A conditional flow is defined by 4 artifacts:- The work to execute first
- A predicate for the conditional logic
- The work to execute if the predicate is satisfied
- The work to execute if the predicate is not satisfied (optional)
- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
- See Also:
ConditionalFlow.Builder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConditionalFlow.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkReportexecute(WorkContext workContext)Execute the unit of work and return its report.StringgetName()The name of the unit of work.
-
-
-
Method Detail
-
execute
public 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
-
-