# Maintenance Mode

The maintenance mode is a strongly reduced 4ALLPORTAL, where only relevant parts of 4App Core Engine are loaded. It is intended for general system changes (e.g. app upgrades) or to fix critical errors.
With an active maintenance mode, a login to the 4ALLPORTAL is not possible. Instead of the login screen, a maintenance mode screen displays:

For fixing, administrators (users with permission has_superadmin) can access the 4ALLPORTAL administration area (details).

# Admin Activation

Maintenance mode can be activated by an admin on purpose, e.g., before upgrading a 4App, in admin snap-in General System configurations/System Settings/Maintenance. The mode becomes active and automatically restarts the system after confirming a pop-up.

Please note: To avoid unwanted errors in the log, some threads should not start again in maintenance mode. Therefore, a restart is always required when activating maintenance mode.

# Automatic Activation

Maintenance mode starts automatically when one of the following cases occur:

  • Dependency error: In case of an app dependency error (e.g., an LDAP for Core Engine 3.10 is installed on a system with Core Engine 4.0), the maintenance mode lets admins deactivate the not working application in admin snap-in App management/Apps.
  • Update script error: If an upgrade script of priority "high" fails with FATAL_ERROR, the maintenance mode lets admins identify the not working script and try to restart or skip it in admin snap-in Protocol overview/Update Management.

Please note: After fixing dependency or upgrade script errors, you need to make a system restart.

Open User Sessions

As soon as maintenance mode is active and the system restarted, open user sessions without permission has_superadmin will be deleted if the session is accessed and the 4ALLPORTAL page is opened. Open user sessions that have permission has_superadmin will not be deleted. Admins will see the system in maintenance mode.

Make sure to inform your users before activating maintenance mode.

# Deactivation

Because maintenance mode is mostly used for critical system changes, a restart of the 4ALLPORTAL is required after upgrading and/or solving the reasons for maintenance mode. It is not possible to leave maintenance mode without a restart.

If you started maintenance mode on purpose, deactivate button "Maintenance mode" before restarting.
If maintenance mode started automatically, it automatically stops after a restart if

  • the error does no longer occurs and
  • there is no further reason for the maintenance mode

# Access During Maintenance Mode

During maintenance mode, the login screen can only be reached by adding parameter /?forceLogin=true to the system URL (e.g.: customer.4allportal.cloud/?forceLogin=true).
Admins with super administrator rights can now regularly log in. This is also possible via an authentication provider like SAML.

# System Behaviour in Maintenance Mode

In maintenance mode, the following functions are enabled/disabled:

Enabled:

  • administration area with app management and protocol overview
  • all apps that are compatible with 4App Core Engine
  • database synchronization for relevant modules

Disabled:

  • all apps that are not compatible with 4App Core Engine
  • all not required modules from 4App Core Engine
  • system reload ("Clear configuration cache")
  • automatic upgrade/update scripts for not required modules (can be re-triggered manually)
  • request management (only read-only in protocol overview)
  • EventManagement
  • hooks/EventListeners (except user-related modules)
  • most @Scheduled methods (details)

# Developer Information

# Spring Scheduled

Most @Scheduled methods will not be executed. All @Scheduled methods in standard 4Apps query the Core Engine state with class ISystemService, which tests whether the system is completely initialized (isInitialized), or ready to use (isReady) or in maintenance mode (isMaintenance). The methods used are:

systemService.isInitialized() is true systemService.isMaintenance() is true systemService.isAllowed() is true systemService.isReady() is true

Custom Apps

@Scheduled methods should always query the state of the Core Engine before execution. You should check for a stable system with systemService.isInitialized() is true.
Please avoid using @Scheduled methods in maintenance mode.

Request missing documentation