10.7. Asynchronous Reconciliation

Reconciliation can work in tandem with workflows to provide additional business logic to the reconciliation process. You can define scripts to determine the action that should be taken for a particular reconciliation situation. A reconciliation process can launch a workflow after it has assessed a situation, and then perform the reconciliation, or some other action.

For example, you might want a reconciliation process to assess new user accounts that need to be created on a target resource. However, new user account creation might require some kind of approval from a manager before the accounts are actually created. The initial reconciliation process can assess the accounts that need to be created, launch a workflow to request management approval for those accounts, and then relaunch the reconciliation process to create the accounts, once the management approval has been received.

In this scenario, the defined script returns IGNORE for new accounts and the reconciliation engine does not continue processing the given object. The script then initiates an asynchronous process which calls back and completes the reconciliation process at a later stage.

A sample configuration for this scenario is available in openidm/samples/sample9, and described in Sample 9 - Asynchronous Reconciliation Using Workflows in the Installation Guide.

Configuring asynchronous reconciliation involves the following steps:

  1. Create the workflow definition file (.bar file) and place it in the openidm/workflow directory. For more information about creating workflows, see Integrating Business Processes and Workflows.

  2. Modify the conf/sync.json file for the situation or situations that should call the workflow. Reference the workflow name in the configuration for that situation.

    For example, the following sync.json extract calls the managedUserApproval workflow if the situation is assessed as ABSENT:

                    {
                        "situation" : "ABSENT",
                        "action" : {
                            "workflowName" : "managedUserApproval",
                            "type" : "text/javascript",
                            "file" : "bin/defaults/script/workflow/workflow.js"
                        }
                    },
           
  3. In the sample configuration, the workflow calls a second, asynchronous reconciliation process as a final step.