Administer > Time Period management > Time period recurrence rules

Time period recurrence rules

A time period rule reflects the recurrence of future start and end times of the time period occurrences. The time period rule stores all the recurrence patterns. The occurrences are created based on the rule.

There are five rule types available: Arbitrary, Daily, Weekly, Monthly, and Yearly. All types, except for Arbitrary, can be configured with several recurrence rules. Arbitrary allows the configuration of specific start and end times, in case some occurrences do not follow a specific rule.

Principles of Rules

The following principles apply to time period rules.

Time Period Phase Principles
Planning

You can create, change, or remove a rule when the time period was never approved before, and the following happens:

  • As soon as you create a rule, the occurrences are created in Inactive state.
  • As soon as you change a rule, the occurrences are deleted and new ones recreated in Inactive state.
  • As soon as you remove a rule, the occurrences are removed.

Once the time period was approved, its rules are locked and cannot be changed anymore if it is not in the first phase.

  • When the global LOCK setting is set to true, a locked rule allows only activation/deactivation in the Planning phase, and all its future occurrences are deleted.
  • When the global LOCK setting is set to false, a locked rule allows deletion / modification of the rule only in the Planning phase.
Approval Rules are displayed in read-only.
Published Rules are displayed in read-only.
Retired

When a Time Period is retired, the associated rules are set to Inactive.

In case a Time Period is unretired, the associated rules remain Inactive and need to be reactivated manually if the rules are still valid.

Once a rule is configured, various actions are started to prevent users from unauthorized editing, as shown in the following figure.

Global lock setting

The time period global settings contains this option: Lock Rules once approved. This global lock setting allows administrators to decide whether or not users can edit, delete, activate, or deactivate rules after approval. By default, this global lock is not enabled.

The following table describes the behaviors when this option is enabled (set to true) and disabled (set to false).

Global Lock Setting Behavior
false

Update Rules

Updating rules is only possible in the first phase of the workflow. To update a rule, access an existing time period in the “planning” phase, click the Rule Id in the Rules section, and then update the rule. When your edits are complete, click Save.

The following functionality is implemented in case a rule was changed:

  • If the time period was NOT approved before, all occurrences are recalculated.
  • If the time period was approved before, all future occurrences are recalculated.

Delete Rules

Deleting rules is only possible in the first phase of the workflow. Delete is only possible when the time period was not approved before. To delete a rule, access an existing time period in the “planning” phase, click the Rule Id in the Rules section, and then click Delete.

When a rule is deleted, all occurrences for this rule are deleted.

Add Rules

Adding rules is only possible in the first phase of the workflow. To add a rule, open a time period and click New in the Rules section.

true

Update Rules

Updating rules is only possible in the first phase of the workflow if the time period was NOT approved. To update a rule, follow the steps described above.

Once the time period was approved and the time period is again in the first phase, the rules are displayed in read-only, but a Deactivate Rule or Activate Rule button is available on the top of the screen to allow you to deactivate or activate the rule.

Delete Rules

Deleting rules is only possible in the first phase of the workflow if the time period was NOT approved. Once the time period was approved and the time period is again in the first phase, you cannot delete its rules anymore. To delete a rule, access an existing time period in the “planning” phase, click the Rule Id in the Rules section, and then click Delete.

When a rule is deleted, all occurrences for this rule are deleted.

Add Rules

Adding rules is possible only in the first phase of the workflow. To add a rule, open a time period and click New in the Rules section.

Rule security

Rules are not secured by a separate area or role, and therefore the security of a rule is closely tied to the security of its time period definition. Basically, if you can update a time period, you can also update its rules.

Note The security of the rules is implemented in function getEditRights(record) in the timeperiodRule ScriptLibrary record.

Related concepts

Time Period Management
Time Period Management concepts
Time Period Management process
Time period workflow
Time period occurrences
Time period security areas and roles

Related tasks

Working with time periods
Time period configuration tasks