Class ParallelFlowReport
java.lang.Object
com.redhat.parodos.workflows.workflow.ParallelFlowReport
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionCreate a newParallelFlowReport.ParallelFlowReport(List<WorkReport> reports) Create a newParallelFlowReport. -
Method Summary
Modifier and TypeMethodDescriptionReturn the last alertMessage of partial reports, or null if there are no alertMessage.getError()Return the first error of partial reports.Get partial reports.Return the status of the parallel flow.The parallel flow context is the union of all partial contexts.
-
Constructor Details
-
ParallelFlowReport
public ParallelFlowReport()Create a newParallelFlowReport. -
ParallelFlowReport
Create a newParallelFlowReport.- Parameters:
reports- of works executed in parallel
-
-
Method Details
-
getReports
Get partial reports.- Returns:
- partial reports
-
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
Return the first error of partial reports.- Specified by:
getErrorin interfaceWorkReport- Returns:
- the first error of partial reports.
-
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
-
getAlertMessage
Return the last alertMessage of partial reports, or null if there are no alertMessage.- Specified by:
getAlertMessagein interfaceWorkReport- Returns:
- the last alertMessage
-