Class ResubmissionDestination
java.lang.Object
co.yellowdog.platform.model.ResubmissionDestination
- All Implemented Interfaces:
Serializable
A destination to which tasks that fail can be resubmitted. A resubmitted task is set to
TaskStatus.RESUBMITTED instead of TaskStatus.FAILED, and a copy of it is added to the destination
TaskGroup. If the destination TaskGroup does not exist in the same WorkRequirement, or is no
longer able to accept tasks, the task is then set to TaskStatus.FAILED.- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResubmissionDestination(String destinationTaskGroup, Selection<TaskErrorSelector> resubmitErrors) Creates a newResubmissionDestinationinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ResubmissionDestinationdestination(String destinationTaskGroup) Create aResubmissionDestinationthat will resubmit allTasks that fail to the destinationTaskGroup.static ResubmissionDestinationdestination(String destinationTaskGroup, Selection<TaskErrorSelector> resubmitErrors) Create aResubmissionDestinationthat will resubmitTasks that fail and match theSelectionto the destinationTaskGroup.Name of theTaskGroupto which any matching tasks that fail should be resubmitted.
-
Constructor Details
-
ResubmissionDestination
public ResubmissionDestination(String destinationTaskGroup, Selection<TaskErrorSelector> resubmitErrors) Creates a newResubmissionDestinationinstance.- Parameters:
destinationTaskGroup- Name of theTaskGroupto which any matching tasks that fail should be resubmitted.resubmitErrors- OptionalSelectionto determine whichTasks are eligible to be resubmitted to the to destinationTaskGroup. If noSelectionis specified, all errors will match. Make sure to only omitresubmitErrorsif this is the lastResubmissionDestinationin theFailurePolicy, otherwise and proceedingResubmissionDestinations will be unreachable.The
TaskErrorSelectorwill be applied to the last seen error.
-
-
Method Details
-
destination
Create aResubmissionDestinationthat will resubmit allTasks that fail to the destinationTaskGroup.- Parameters:
destinationTaskGroup- Name of theTaskGroupto which to resubmit theTasks that fail- Returns:
- The
ResubmissionDestination - See Also:
-
destination
public static ResubmissionDestination destination(String destinationTaskGroup, Selection<TaskErrorSelector> resubmitErrors) Create aResubmissionDestinationthat will resubmitTasks that fail and match theSelectionto the destinationTaskGroup. -
builder
-
getDestinationTaskGroup
-
getResubmitErrors
OptionalSelectionto determine whichTasks are eligible to be resubmitted to the to destinationTaskGroup. If noSelectionis specified, all errors will match. Make sure to only omitresubmitErrorsif this is the lastResubmissionDestinationin theFailurePolicy, otherwise and proceedingResubmissionDestinations will be unreachable.The
TaskErrorSelectorwill be applied to the last seen error.
-