This is an old revision of the document!


Synchronization - time slices of contractual relationship

Time slices of identity (contractual) relationship synchronization works according to the same rules as identity synchronization. In this page we will described only extra behavior specific for this synchronization.
Sync of contract slice using specific configuration from sync of contract. Valid till date is set only if slice is last (in sync)!
Typically one contractual relationship is equals to one contract in company for the identity. One slice of the contractual relationship describes how looked the contract in specific time slot. Sync of slices persists slices to the entity `IdmContractSlice` and creates relation on the account with entity `AccContractSliceAccount`. If more slices exists for same contract, then only one is using as source at one time.
Actions executes after end of sync are not executed when user canceled sync!

Before HR process is executed long running task select current contract slice. This options is controlled by checkbox *After end, start HR process*. LRT is started synchronously and complete log will contain information about it.

HR processes in the base ensure the correct state of identity depending on the state of their contractual relationships. Because we need to evaluate the status of contractual relationships as a whole (to a given identity), it is not possible to trigger HR processes during the synchronization of each contractual relationship. Therefore, no HR processes are executed during this synchronization.

HR processes can be (should be) correctly started after the end of the sync. This can be ensured by the property `After end, start the HR processes` on the detail of sync configuration. If is this property ticked, then HR processes 'Enabled contract', 'End of contract', 'Contract exclusion' (in this order) will be automatically started after correctly end of contract relationships sync.

Recalculation of automatic roles is skipped during sync. Recalculation of automatic roles can be (should be) correctly started after the end of the sync. This can be ensured by the property 'After end, start the automatic role recalculation' on the detail of sync configuration.

Bellow is an example of contractual relationship mapping using slices. This is only an example; in general, slices must be mapped in the same way that contracts are but must have two extra attributes: "Valid from of slice" and some sort of "Slice ID".

* Contract code - Code of the parent contract. This `String` value represents relation between all slices for the same contract. * Valid from of slice - Defines time from that is slice valid. Valid till of slice is computes automatically (by validity of next slice) after save. Output value from attribute transformation must be 'org.joda.time.LocalDate' (or String in the format `yyyy-MM-dd`). * Slice ID - ID of the time slice, it is often transformed by combining "Contract code" and "Valid from of slice", e. g., "000054-24-07-2019". * Owner - Relation owner. Must be identity in IdM. This field is required for every relation. Output from attribute transformation can be:

  • ID of IdM identity in String or UUID format.
  • Username of IdM identity in String.

* Main - Define if is the contract main (between all contracts for the identity). Output from attribute transformation must be Boolean. * State - State of contract. Output from attribute transformation must be enumeration ContractState or String representation for this enumeration (DISABLED, EXCLUDED) (more details see below). * Position - String representation of contract. Typically name of contract. * Guarantees - List of leaders, directly linked on the contractual relationship (more details see below). * Work position - Define link to some tree node. Generaly define place in organization structure (more details se below). * Valid from of contract - Validity for the contractual relationship. Output value from attribute transformation must be 'org.joda.time.LocalDate' (or String in the format `yyyy-MM-dd`). * Valid till of contract - Validity for the contractual relationship. Output value from attribute transformation must be 'org.joda.time.LocalDate' (or String in the format `yyyy-MM-dd`). * Externe - If is the contractual relationship for externe identity, then is output value (boolean true) . * Description - String for description the relation.

List of leaders, directly linked on the contractual relation. Linked leader must exists in IdM. Output from attribute transformation can be:

  • Username of leader (String).
  • Id of leader (UUID or String).
  • List of usernames (List<String>).
  • List of Ids (List<String> or List<UUID>).
  • Null value. If is value not defined and in sync configuration has set 'Default leader', then will be this leader set to relation.

If some leader will not found. Then will be synchronization item marked as 'warning' (relation will be created/saved). Detail information will be saved in item log:

.........................
Finding guarantee [temslie7].
.........................
Warning! - Identity [temslie7] was not found for [temslie7]!
.........................

Define link to some tree node. Generaly define place in organization structure. Output from attribute transformation can be:

  • Id of tree node (UUID or String).
  • Code of tree node. Node by code will be searching in default tree (define in sync configuration 'Default type of structure').
  • Null value. If is value not defined and in sync configuration has set 'Default position in structure', then will be this node set to relation.

If node will not found. Then will be synchronization item marked as 'warning' (relation will be created/saved). Detail information will be saved in item log:

........................
Work position - try find directly by transformed value [Divanoodle]!
........................
Work position - was not not found directly from transformed value [Divanoodle]!
........................
Work position - try find in default tree type [DEFAULT_ORG] with code [Divanoodle]!
........................
Warning - Work position - none node found for code [Divanoodle]!
When isn't work-position attribute defined in the mapping, then none default position will be set.

State of contract. Output from attribute transformation must be enumeration ContractState or String representation for this enumeration.

ContractState have this values:

  • by doischert