Table of Contents

Time slices of contractual relationships

Many companies employ data sources about users, employees or org. structures that work with so-called time slices. For this purpose, an agenda of contract time slices was designed.

The basic idea is that time slices are stored in a self-contained agenda. This agenda only contains time slices for identity contracts. If a slice is currently valid, its values will be copied into the respective identity's contract. Every day a scheduled task is performed to identify a valid time slice, and to copy its value into a contract).
On any given day, only one slice per contract may exist. Every slice must contain all the contract data. In a sense, a slice is a snapshot of a contract!

Task for updating a contract using a current slice

To recalculate the current slice, you can use the SelectCurrentContractSliceTaskExecutor task. This task seeks all slices that should be used for the current date, and copies their values to their parent contracts.

Suppose more than one slice is found during synchronization (for the same contract). Which of them should be set as the current one? Because of that, the contract is not recalculated! Error will be logged in this long-running task.
By default, this task is triggered every day at 0:30 AM.

Protection of the contract validity

There may be a situation when one time slice ends the contract, while there is another time slice that restarts this contract. If there is no gap between its termination and restart dates, then the contract will not be terminated (no accounts will be deleted). However, if the dates do not follow seamlessly, then (by default) the contract is terminated, and all connected accounts will be removed from the target systems.

In some situations (projects), a protection period must be used over the course of which a contract will not be terminated, provided that there is another slice relevant to the contract that restarts the latter. Furthermore, the gap between the termination and the beginning of the contract must be shorter than or equal to the protection interval.

The protected interval can be set using the property idm.sec.core.contract-slice.protection-interval, where the value is a number of days. If the number of days between the termination of the contract and its renewal in the following time slice is shorter than or equal to the number of days set in the protection interval, then the date of the contract validity from the following slice will be used instead of the date of termination of the contract from the currently valid slice.
By default, protection interval is disabled. The process of creating/updating a contract by slice can be customized.
Contracts cannot be modified or removed when they contain some slices (are controlled by slices). Once the last slice of the contract is deleted, then the contract will be deleted as well.

Sync

The synchronization of time slices is very similar to the synchronization of contracts.

Sync of slices adds new attributes:

Sync of contract slice usees the specific configuration from sync of contract. Valid till date is set only if a slice is the last one (in sync)!

More information about sync of time slices is here.