Import Roles from database

Sample workflow to import roles from a database via Web Services

Import Roles from database is a source workflow that reads role definitions from the connected directory RoleDB and writes them into the SPMLv2WebServices endpoint on the Identity side. The TS port is the JDBC source, and the IdentityDomain port forwards the imported role data through the SpmlV1toV2Connector.

Use this workflow when an external database is the authoritative source for role entries that you want to maintain in DirX Identity. The workflow works on the roles channel and combines a JDBC source with SPMLv2 web services on the destination side.

The workflows in this reference are delivered as factory data and are loaded into the Connectivity configuration database during the initial configuration. They are samples: use the Identity Manager to copy a workflow into your own scenario and adapt the copy. Do not change the delivered objects, because a product update can replace them.

At a Glance

Name

Import Roles from database

Category

Source Realtime / JDBC

Technology

Java-based real-time workflow

LDAP object class

dxmIDMWorkflowDefinition

Workflow type

ProvisionTS

Connected system / controller type

not applicable

Configuration wizard

JDBC-SPMLv2

Active in the factory data

FALSE

Factory data version

8.0

Factory data path

Workflows/Default/Source Realtime/JDBC/Import Roles from database

Prerequisites

  • You need a connected directory RoleDB that is configured for the JDBCConnector and uses the bind profile JDBC Database Admin.

  • You need the connected directory SPMLv2WebServices for the IdentityDomain port, with the bind profile Domain_Admin.

  • The Java-based Server that runs the workflow must be able to reach the database, the SPMLv2 web-service endpoint, and the JMS and mail infrastructure that the event, notify and error ports use.

  • Configure the source and destination mappings so that the roles channel can resolve the intended role entries on both sides.

Workflow and Activities

Activity Type Component description Description Ports

error

error

provisioningActivity

Error Activity

Message

join

ProvisionTS

provisioningActivity

Join activity for the provision-to-TS workflow

event, IdentityDomain, notify, ts

Ports

Activity Port Component description Connector Connected directory Bind profile SSL

error

Message

errorPort

ErrorNotifyMailConnector

-

-

not set

join

event

notificationPort

JmsConnector

-

-

not set

join

IdentityDomain

provisioningPort

SpmlV1toV2Connector

SPMLv2WebServices

Domain_Admin

not set

join

notify

notificationPort

NotifyMailConnector

-

-

not set

join

TS

provisioningPort

JDBCConnector

RoleDB

JDBC Database Admin

not set

Channels

Table 1. Channels of port IdentityDomain (activity join)
Channel Description Reference type Delta type

roles

Channel for roles

not set

not set

Table 2. Channels of port TS (activity join)
Channel Description Reference type Delta type

roles

Channel for roles

not set

not set

Configuration Parameters

Table 3. Workflow parameters of Import Roles from database
Parameter Default value

timeout

P0Y0M4DT0H0M0S

Table 4. Parameters of activity error
Parameter Default value

resourcefamily

Mail

retrylimit

3

timeout

P0Y0M1DT0H0M0S

waitbeforeretry

P0Y0M0DT2H0M0S

Table 5. Parameters of port Message (activity error)
Parameter Default value

decrypt.attribute

dxmPassword

Table 6. Parameters of activity join
Parameter Default value

resourcefamily

JDBC

retrylimit

3

timeout

P0Y0M1DT0H0M0S

waitbeforeretry

P0Y0M0DT0H30M0S

Table 7. Parameters of port event (activity join)
Parameter Default value

appid

event

decrypt.attribute

userPassword

tgtisjmsclient

false

Table 8. Parameters of port notify (activity join)
Parameter Default value

decrypt.attribute

userPassword

A Java-based real-time workflow runs as a permanently loaded configuration in the Java-based Server (IdS-J). It is triggered by a request or an event rather than by a schedule. Each workflow consists of activities; an activity opens one port per system it talks to, and each port uses a connector to reach that system.

Most provisioning workflows contain a join activity that performs the actual work and an error activity that receives requests which still fail after all retries and sends a notification about them. The retrylimit, waitbeforeretry and timeout parameters of an activity control how often and how long a failed request is retried before it is handed to the error activity.

The event port publishes change events over JMS, and the notify port sends e-mail notifications. Neither port is bound to a connected directory.

The join activity performs the import. Its TS port reads roles from RoleDB, and its IdentityDomain port forwards the corresponding role data through SPMLv2WebServices over the roles channel. The event port receives the JMS requests that start the workflow, and the notify port sends the configured mail notifications.

A request that fails is retried up to three times (retrylimit) with 30 minutes between attempts (waitbeforeretry). If it still fails, the error activity takes it over and reports it through the Message port; the workflow parameter timeout gives a request four days before it is discarded.

Operation

  1. A change for the roles channel reaches the workflow through the event port.

  2. The Java-based Server passes the resulting request to the join activity.

  3. The TS port reads the affected role from RoleDB.

  4. The IdentityDomain port forwards the create, update or delete request through SPMLv2WebServices into DirX Identity.

  5. The notify port sends the configured notifications, and the event port publishes the resulting workflow event.

  6. Requests that fail permanently are handed to the error activity, which reports them by e-mail.

The workflow is delivered inactive (dxmActive is FALSE). Copy it into your own scenario, connect the copy to your connected directory and activate the copy.