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 Details

  • Method Details

    • cleanupWorkflows

      public MaintenanceResults cleanupWorkflows(MaintenanceConfiguration configuration)
      Cleans up old (whose modified time is earlier than olderThanPeriod parameter) and passive (that do not have nextActivation) 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.
    • cleanupExecutors

      public int cleanupExecutors(org.joda.time.ReadablePeriod deleteExpiredExecutorsOlderThan)
      Delete workflow executors that have expired [given period] ago.
      Parameters:
      deleteExpiredExecutorsOlderThan - Time to wait before expired executors get deleted.
      Returns:
      Number of executors deleted.