This is an old revision of the document!
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.
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.
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.
Sync
The synchronization of time slices is very similar to the synchronization of contracts.
Sync of slices adds new attributes:
- Contract code - Code of the parent contract. This `String` value represents relation between all slices for the same contract. It means all slices of a contract must have the same value.
- Valid from of slice - Defines time from which a slice is valid. Valid till of slice is computed automatically (relying on the validity of the next slice) after saving.
More information about sync of time slices is here.