/** * Completes the task by setting its stage to FAILED. The subStage can be specified, and if not, * the one named ERROR will be used, if any. */ protected void completeWithError(E subStage, Consumer<T> patchBodyConfigurator) { proceedTo(TaskStage.FAILED, subStage, patchBodyConfigurator); }
/** * Moves the task to the given subStage. The method assumes the task stage is STARTED as this is * the stage where most sub-stage transition happen. */ protected void proceedTo(E subStage, Consumer<T> patchBodyConfigurator) { proceedTo(TaskStage.STARTED, subStage, patchBodyConfigurator); }
/** * Completes the task by setting its stage to FINISHED. The subStage can be specified, and if * not, the one named COMPLETED will be used, if any. */ protected void complete(E subStage, Consumer<T> patchBodyConfigurator) { proceedTo(TaskStage.FINISHED, subStage, patchBodyConfigurator); }
protected void proceedTo(E subStage) { proceedTo(TaskStage.STARTED, subStage, null); }