Table of Contents

Two modes of synchronization

Synchronization supports two basic modes of searching the accounts suitable for synchronization.

More complicated filter criterion

In case you need to create a more complicated filter criterion, it is possible to use this script. In the example below, you can find the situation when you want to filter by the chosen attribute and operation (the filter enters as variable into the script), but at the same time, you want to limit the result with one more condition. In this case, the condition is that all the results must have the attribute "lastname" equivalent to the "Doe" value.

import  eu.bcvsolutions.idm.ic.filter.impl.IcFilterBuilder;
import  eu.bcvsolutions.idm.ic.api.IcAttribute;
import  eu.bcvsolutions.idm.ic.impl.IcAttributeImpl;
 
IcAttribute attr = new IcAttributeImpl("lastname", "Doe");
 
return IcFilterBuilder.and(filter, IcFilterBuilder.equalTo(attr));

IcFilterBuilder provides the following operations:

The output of this script must be an object of the type IcFilter. If the output is null, then the filter will not be applied and synchronization will be launched over all the accounts.

If you want to use the OR operator, you can use maximum 2 parameters due to a bug in ConnId. If you want to join more than 2 parameters by OR, you must split it to subqueries as noted here. Example.

Workflow

In default state, synchronization can administer the identities (create, update, delete). Yet if you need a more complex solution, e.g. when you need to establish industrial relations, the standard synchronization mechanisms won´t be sufficient.

The solution is to use the own workflow which will perform the required operation (e.g. the creation of industrial relations mentioned above). The workflow can be set up separately for each situation.

If the synchronization finds out that workflow is set up in a given situation, it will launch it. In such case, the synchronization does not do anything with the given account anymore, i.e. all the active operations are performed by the workflow.

The workflow which should be possible to be used in synchronization, must satisfy several criteria. The first one is the category in which the workflow is included.

The only definitions of workflow that will be offered will be those appearing in the category eu.bcvsolutions.sync.action.

For synchronization, the workflow further expects the following input variables:

- uid (String),
- entityType (enum SystemEntityType),
+ icAttributes (List of IcAttribute),
- syncConfigId (UUID for SysSyncConfig),
- actionType (String)
- situation(String),
+ accountId(UUID),
+ entityId(UUID)

An example of how such workflow may look like is the following demonstration process (syncActionExampl). This process will establish an approval task for the administrator (admin) for every account of which the UID starts with test. All the other accounts will go through standard implementation according to the evaluated situation and the set-up action. The workflow is also showing that only one process resolving all the situations can exist.

Logs

The synchronization logs are divided into three parts:

        CREATE_ENTITY,
	UPDATE_ENTITY, 
	DELETE_ENTITY,
	LINK_AND_UPDATE_ACCOUNT, //create link and produce entity save event (call provisioning)
	LINK_AND_UPDATE_ENTITY, // create link, update entity
	LINK,
	UNLINK,
	UNLINK_AND_REMOVE_ROLE,
	CREATE_ACCOUNT, // produce only entity save event (call provisioning)
	UPDATE_ACCOUNT, // produce only entity save event (call provisioning)
	LINKED, // situation (for IGNORE and WF sort)
	MISSING_ENTITY, // situation (for IGNORE and WF sort)
	UNLINKED, // situation (for IGNORE and WF sort)
	MISSING_ACCOUNT, // situation (for IGNORE and WF sort)
	IGNORE,
	UNKNOWN;

Each of these types may attain the following states:

 	SUCCESS,
	ERROR,
	WARNING,
	IGNORE,
	WF

Specific synchronization options

You can configure additional synchronization options for specific uses:

Events

Synchronization makes use of the standard mechanism of events in IdM, adding three new events:

and new processors:

Scheduled task

For the scheduled activation of the synchronization, the task SynchronizationSchedulableTaskExecutor has been created which has the uuid as an input parameter of the configuration of the running synchronization.

For now the dynamic form for task scheduling does not support other wording than a simple text field.

The task will read the synchronization configuration according to the entered uuid, and will launch it in the same way as a direct launching from the overview of the configured synchronization configurations on the system detail.

After the launching, it is possible to observe and possibly stop the running synchronization from the overview of running tasks. When the task is finished, the final log can be seen not only in the synchronization agenda on the system, but also in the overview of all tasks.

Removing "wish"

(since 9.3.0)

The attribute "wish" of the SysSystemEntity marks entities, which were created by provisioning, but which were never successfully provisioned (see more in provisioning operation life cycle). Most common reasons of this situation are:

In both situations, the corresponding Create operation is waiting for some manual action in the provisioning queue, or it was already deleted by admin.

Since synchronization in principle knows, which accounts (identifiers) really exist on the target system, it removes "wish" from their corresponding system entities to correct the information in IdM. However, synchronization removes "wish" only if it is safe - so it won't lead to any unwanted linking (auto mapping) of the accounts. Therefore, "wish" is removed in the following situations: