Package io.nflow.engine.workflow.curated
Class MaintenanceWorkflow
- java.lang.Object
-
- io.nflow.engine.model.ModelObject
-
- io.nflow.engine.workflow.definition.WorkflowDefinition
-
- io.nflow.engine.workflow.curated.CronWorkflow
-
- io.nflow.engine.workflow.curated.MaintenanceWorkflow
-
@Component public class MaintenanceWorkflow extends CronWorkflow
Clean up workflow instances periodically.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAINTENANCE_WORKFLOW_TYPEstatic StringVAR_MAINTENANCE_CONFIGURATION-
Fields inherited from class io.nflow.engine.workflow.curated.CronWorkflow
DISABLED, DO_WORK, FAILED, HANDLE_FAILURE, SCHEDULE, VAR_SCHEDULE, WAIT_FOR_WORK_TO_FINISH
-
Fields inherited from class io.nflow.engine.workflow.definition.WorkflowDefinition
allowedTransitions, failureTransitions
-
-
Constructor Summary
Constructors Modifier Constructor Description MaintenanceWorkflow()Create maintenance workflow definition.protectedMaintenanceWorkflow(String type, WorkflowSettings settings)Extend maintenance workflow definition with customer workflow settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NextActiondoWork(StateExecution execution, MaintenanceConfiguration conf)Clean up old workflow instances.-
Methods inherited from class io.nflow.engine.workflow.curated.CronWorkflow
getNextActivationTime, handleFailure, handleFailureImpl, schedule, waitForWorkToFinish, waitForWorkToFinishImpl
-
Methods inherited from class io.nflow.engine.workflow.definition.WorkflowDefinition
getAllowedTransitions, getDescription, getErrorState, getFailureTransitions, getInitialState, getMethod, getMethod, getName, getSettings, getState, getStates, getSupportedSignals, getType, isAllowedNextAction, isStartState, permit, permit, registerState, setDescription, setName
-
Methods inherited from class io.nflow.engine.model.ModelObject
equals, hashCode, toString
-
-
-
-
Field Detail
-
MAINTENANCE_WORKFLOW_TYPE
public static final String MAINTENANCE_WORKFLOW_TYPE
- See Also:
- Constant Field Values
-
VAR_MAINTENANCE_CONFIGURATION
public static final String VAR_MAINTENANCE_CONFIGURATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MaintenanceWorkflow
public MaintenanceWorkflow()
Create maintenance workflow definition.
-
MaintenanceWorkflow
protected MaintenanceWorkflow(String type, WorkflowSettings settings)
Extend maintenance workflow definition with customer workflow settings.- Parameters:
type- The type of the workflow definition.settings- The workflow settings.
-
-
Method Detail
-
doWork
public NextAction doWork(StateExecution execution, MaintenanceConfiguration conf)
Clean up old workflow instances.- Parameters:
execution- State execution context.conf- The maintenance configuration.- Returns:
- The action to go schedule state.
-
-