Class ParallelFlowReport
- java.lang.Object
-
- com.redhat.parodos.workflows.workflow.ParallelFlowReport
-
- All Implemented Interfaces:
WorkReport
public class ParallelFlowReport extends Object implements WorkReport
Aggregate report of the partial reports of work units executed in a parallel flow.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Constructor Summary
Constructors Constructor Description ParallelFlowReport()Create a newParallelFlowReport.ParallelFlowReport(List<WorkReport> reports)Create a newParallelFlowReport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowablegetError()Return the first error of partial reports.List<WorkReport>getReports()Get partial reports.WorkStatusgetStatus()Return the status of the parallel flow.WorkContextgetWorkContext()The parallel flow context is the union of all partial contexts.
-
-
-
Constructor Detail
-
ParallelFlowReport
public ParallelFlowReport()
Create a newParallelFlowReport.
-
ParallelFlowReport
public ParallelFlowReport(List<WorkReport> reports)
Create a newParallelFlowReport.- Parameters:
reports- of works executed in parallel
-
-
Method Detail
-
getReports
public List<WorkReport> getReports()
Get partial reports.- Returns:
- partial reports
-
getStatus
public WorkStatus getStatus()
Return the status of the parallel flow. The status of a parallel flow is defined as follows:org.jeasy.flows.work.WorkStatus#COMPLETED: If all work units have successfully completedorg.jeasy.flows.work.WorkStatus#FAILED: If one of the work units has failedorg.jeasy.flows.work.WorkStatus#IN_PROGRESS: If one of the work units is in progressorg.jeasy.flows.work.WorkStatus#REJECTED: If one of the work units has rejectedorg.jeasy.flows.work.WorkStatus#PENDING: If one of the work units is pending
- Specified by:
getStatusin interfaceWorkReport- Returns:
- workflow status
-
getError
public Throwable getError()
Return the first error of partial reports.- Specified by:
getErrorin interfaceWorkReport- Returns:
- the first error of partial reports.
-
getWorkContext
public WorkContext getWorkContext()
The parallel flow context is the union of all partial contexts. In a parallel flow, each work unit should have its own unique keys to avoid key overriding when merging partial contexts.- Specified by:
getWorkContextin interfaceWorkReport- Returns:
- the union of all partial contexts
-
-