- Created by Karolin Hemmingsson, last modified by Ylva Andersson on Apr 28, 2023
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 10 Next »
This article describes how to set up scheduled jobs in Smart ID Identity Manager. Scheduled jobs can be used for example to do scheduled import of person data from Active Directory or human resources (HR) system.
There are two ways to create a scheduled job - via a timed process or via batch synchronization. Both are described in this article.
Prerequisites
The following prerequisites apply:
- Installed Identity Manager
Timed process
A timed process job has a cron expression that defines when and how often the job should run.
- Log in to the Identity Manager Admin as an
admin
user.
To add or edit a timed process:
- Go to Home > Scheduled jobs.
- To add a new timed process, click +New. Enter a Name, select Job type (Timed process). Click Save+Edit.
- On the right hand side in the next screen, provide a cron expression to schedule the job.
- In Timed Process on the left hand side, select the process that you want to execute from the drop down menu.
To edit an existing timed process, double-click the timed process name.
To see the status of a scheduled job:
- Log in to Identity Manager Operator.
- Click the ADMIN tab, and then Scheduled jobs in the menu on the left.
All scheduled jobs are listed with a description, status, start and end time of the last synchronization and when the next execution is due.
The configuration depends on if the check box Enabled in Identity Manager Admin is checked or unchecked. Read more under heading "Activate/deactivate a batch synchronization job" below.
Batch synchronization
To create a batch synchronization, you first need a target data pool, a target core template, a search configuration with a corresponding data pool defining the data source, and a mapping, as described below. These tasks are done in Identity Manager Admin. The status of batch synchronizations can be viewed in Identity Manager Operator.
All search configurations and processes that are executed by a batch synchronization must be assigned to the role 'BaseRoleBatchSync', which is defined in the Identity Manager Base package.
To change which role is defined for batch synchronization, there is a setting in system.properties, see List of Identity Manager system properties
Create data pools, core template, search configuration, and mapping
- Log in to the Identity Manager Admin as an
admin
user.
A source data pool is required to connect to the data source that you wish to synchronize with, for example Active Directory (LDAP) or HR system.
To add or edit data pools for batch synchronization:
- Go to Home > Data Pools. Add or edit a data pool, see Set up data pool in Identity Manager for a complete instruction.
For example, do the following settings:- Click Data Sources. Enter the connection details to the Active Directory (via LDAP) or HR system (via any suitable data connector) you wish to synchronize with. See Set up data pool in Identity Manager for how to connect to different data sources.
- Add External fields as needed.
- Click Field List. Change the order of the fields or the field details if needed.
- Save and exit the data pool.
A search configuration is required to search in the source data pool for the unique identifier fields.
To add or edit a search configuration for a specific batch job:
- Go to Home > Search Configurations. Add or edit a search configuration, select the created data pool as reference. See Set up search configuration in Identity Manager for a complete instruction.
For example, do the following settings:- Go to the General tab.
- Add the fields to be used as unique identifiers.
- Go to the Purpose tab and check Search.
- Save and exit the search configuration.
A target core template and corresponding data pool are required to store the imported data in.
To create a target core template and data pool:
- To create a target data pool, go to Home > Data Pools. Add or edit a data pool, see Set up data pool in Identity Manager for a complete instruction. Configure the details. Save and exit the data pool.
- To create a target identity template, go to Home > Identities. Add or edit an identity, see Set up identity template in Identity Manager for a complete instruction. Select the target data pool from the previous step. Configure any other details, and save and exit the identity template.
To adapt the mapping for a specific batch job:
- Go to Home > Mappings. Add or edit a mapping, see Set up mapping in Identity Manager for a complete instruction.
For example, do the following settings:- In From Source Data Pool, select the source data pool.
- In To Target Data Pool, select the target data pool.
- Click Create references automatically, or add fields manually by clicking the plus sign + and then selecting the field names in the columns From Source Data Pool and To Target Data Pool.
- If you need to change a field in a mapping, select another field name in the drop-down list.
- Remove any fields that you don't need to use, to optimize the performance of the batch job.
- Save and exit the mapping.
Create batch synchronization
To add or edit a batch synchronization:
- Go to Home > Scheduled jobs.
- To add a new batch synchronization, click +New. Enter a Name, select Job type (Batch Synchronization). Click Save+Edit.
- To edit an existing batch synchronization, double-click the batch synchronization name.
The batch job configuration opens in Identity Manager Admin.
To adapt the batch synchronization to your data source:
- To edit the unique identifier, click Field Selection next to Unique fields and check the field that marks the unique identifier from your data source. It is possible to use multiple identifiers.
- In Source search configuration, select the created search configuration, specifying the unique identifier in the data source.
- In Target core template, select the target core template where the imported data will be stored.
- In Mapping, select the created mapping from the source to the target data pool.
For scheduling the job, a Cron expression is required. There are Cron generators online that can be used to generate the expression to be entered in Identity Manager Admin.
To set the scheduling:
Go to a Cron generator for Quartz. There are Cron generators online, for example:
- Enter the required schedule, days, hours, and so on. Generate the Cron expression.
- Copy the resulting Cron expression.
- In Identity Manager Admin, go back to the batch synchronization and paste the Cron expression into Expression to schedule the job.
The batch synchronization job will only run if it is enabled, read more in "Activate/deactivate a batch synchronization job".
When you have set the scheduling of a batch synchronization job, you can chose to activate or deactivate the job with the Enabled check box.
Activate:
- In the Job Configuration tab, check Enabled.
- The batch job will run when the corresponding
Cron
expression is triggered.
- The batch job will run when the corresponding
Deactivate:
- In the Job Configuration tab uncheck Enabled.
- The batch job will not run, regardless of the
Cron
expression.
- The batch job will not run, regardless of the
The scheduler usually runs every minute and checks if the data of batch synchronization job was updated. If the enable flag is set, the scheduler creates a new batch sync job.
If you want to do some action for all imported or updated data, a process can be set. The process is only executed if data is inserted or updated, not for identical data.
To change which process to run in a batch job:
- Go back to the batch job.
- In Process, select the required process in the drop-down list.
- Save and exit the batch job.
To see the status of a scheduled job:
- Log in to Identity Manager Operator.
- Click the ADMIN tab, and then Scheduled jobs in the menu on the left.
All scheduled jobs are listed with a description, status, start and end time of the last synchronization and when the next execution is due.
The configuration depends on if the check box Enabled in Identity Manager Admin is checked or unchecked. Read more under heading "Activate/deactivate a batch synchronization job" above.
This article includes updates for Smart ID 23.04.
Related information
- Smart ID Identity Manager
- Identity Manager Admin
- Configure Identity Manager
- Set up data pool in Identity Manager
- Set up search configuration in Identity Manager
- Set up identity template in Identity Manager
- Set up mapping in Identity Manager
- Identity Manager Operator
Links
- No labels