Package io.nflow.engine.service
Class MaintenanceService
- java.lang.Object
-
- io.nflow.engine.service.MaintenanceService
-
@Named public class MaintenanceService extends Object
Service for deleting and archiving old workflow instances from nflow-tables and nflow_archive-tables.
-
-
Constructor Summary
Constructors Constructor Description MaintenanceService(MaintenanceDao maintenanceDao, TableMetadataChecker tableMetadataChecker, WorkflowDefinitionService workflowDefinitionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MaintenanceResultscleanupWorkflows(MaintenanceConfiguration configuration)Cleans up old (whose modified time is earlier thanolderThanPeriodparameter) and passive (that do not havenextActivation) workflows.
-
-
-
Constructor Detail
-
MaintenanceService
@Inject public MaintenanceService(MaintenanceDao maintenanceDao, TableMetadataChecker tableMetadataChecker, WorkflowDefinitionService workflowDefinitionService)
-
-
Method Detail
-
cleanupWorkflows
public MaintenanceResults cleanupWorkflows(MaintenanceConfiguration configuration)
Cleans up old (whose modified time is earlier thanolderThanPeriodparameter) and passive (that do not havenextActivation) workflows. Copies workflow instances, actions and state variables to corresponding archive tables and removes them from production and archive tables as requested.- Parameters:
configuration- Cleanup actions to be executed and parameters for the actions.- Returns:
- Object describing the number of workflows acted on.
-
-