10.5:documentation:adm:provisioning_context

Provisioning context

Provisioning context is used to optimize provisioning by allowing you to prepare data earlier than in individual attributes. The purpose is to avoid load the same data in multiple attributes.

An example might be the need to compute a value of an attribute based on identity contracts. In such a case, it is possible to load this contracts through the relevant service as part of the transformation into the system. However, a problem can arise if we need these same contracts in the other five attributes. At such a moment, it would mean 4 times unnecessary loading of the same contracts.

The solution to this situation is to use provisionig context, which allows you to load a contracts only once and distribute them to each attribute.

Provisioning context can be defined in two ways. The first is to check the predefined options on detail of mapping, that will fill the predefined context items. It is also possible to insert into the context any other object that we need to propagate. For this purpose, a map is included in the context, where the key is a String item and the value is Object.

The predefined context structure:

  • Add a contracts - Loads all identity contracts and adds them to the context (context.getContracts()).
  • Add a roles - Loads all assigned identity roles and adds them to the context (context.getIdentityRoles()).
  • Add roles that assign this system - Loads all assigned identity roles that this system assigns and adds them to the context (context.getIdentityRolesForSystem()).
  • Add an object from the target system - Loads an object from the target system and adds it to the context (context.getConnectorObject()).

The map in the context:

  • Insert object to the context map: context.put(key, value), where key is String and value Object.
  • Get object from the context map: context.get(key), where key is String.

For easy access to the context object, suggestions have been implemented that describe context methods (name, description, return type of the method). These suggestions are used in context scripts, in transformation to the system, and in all scripts that have a 'mapping context' category.

Using the context is very simple. Suppose we want to solve the problem described in the example above. Ie. we need to create a context that will contain all the identity contracts for which provisioning is performed.

  1. Provisioning context is defined on the mapping on the context tab (this tab is visible only for mapping with the provisioning type). On this tab, just check the item 'Add a contracts'. This automatically reads all identity contracts and puts them in context.
  2. Next is only need to use the data from the context in the attributes. This can be done in a transformation into a system whose input attribute is context. To get a list of a contracts can be used 'context.getContracts()' method.