Schedule-Enabled Workflowdocumentation for the dotCMS Content Management System

Workflow Steps can be scheduled to run actions at a specific time, enabling easy automation of Workflow processes. For example, an action can be executed to assign a task to another user, notify a manager, or escalate to another Workflow Step if a task has been in the same Workflow Step for too long.

Enabling Scheduled Workflow Actions

To enable a scheduled action on a Workflow Step:

  1. Open the Workflow Scheme in the Workflow Scheme manager.
  2. Edit the Workflow Step by clicking the name of the Step.
  3. Enable (check) the Enable Schedule checkbox.
  4. Set the schedule properties for the workflow step.

Workflow Step Properties

The following properties control the behavior of schedule-enabled workflow steps:

PropertyDescription
Enable ScheduleEnables or disables a scheduled Action for this Workflow Step.
Scheduled ActionThe Workflow Action to execute when the scheduled time is exceeded.
Scheduled InTime (in seconds) before the Action will be executed on a given content item, after the content enters this Workflow Step.

Note:

  • Only Actions available in the Workflow Step being edited can be selected as scheduled Actions.
  • Any Action available in the Workflow Step may be selected, regardless of the properties set on the Action.
    • This includes Actions which, due to permissions and display conditions, may not be available to any other users at any other times.
    • In fact, you may wish to intentionally create Actions specifically for scheduled operations, which can not be executed directly on any content.
  • The schedule timer is based only on how long the content has been in the Workflow Step, not when the last Action was taken on the content.
    • So the scheduled Action will still be executed even if other Actions have been taken on the content since it moved into this Workflow Step.
  • The scheduled Action will be executed by the system (System User), rather than by a user account.
    • This means that the Action will always execute all Sub-Actions, regardless of the permissions on the content.
    • The only limitation to Sub-Actions executed by a Scheduled Action are that the content must be in an appropriate publishing state for each Sub-Action executed.

Creating Actions that May Only be Used When Scheduled

You can create an Action which can only be used as a scheduled Action by setting the following properties on the Action:

  • Who Can Use: Leave empty (so no one, not even the Administrator can execute the action directly).
  • Show When: Leave all options unchecked (so the Action does not display for any users at any time).

System Properties

For schedule-enabled workflows to function, the following two properties must be set in the dotmarketing-config.properties file.

Note: It is strongly recommended that all changes to the dotmarketing-config.properties file be made through a properties file extension.

## ESCALATION CONFIGURATION
ESCALATION_ENABLE=true
ESCALATION_CHECK_INTERVAL_CRON=0/30 * * * * ?

Note:

  • The system will poll Workflows at a frequency defined by the setting of the ESCALATION_CHECK_INTERVAL_CRON property.
  • If scheduled Workflows are not being used, you may set the ESCALATION_ENABLE property to false or significantly increase the ESCALATION_CHECK_INTERVAL_CRON interval to avoid uneccessary processing.