Name Last Update
..
conf Loading commit data...
data Loading commit data...
workflow Loading commit data...
README Loading commit data...

README

Async reconciliation Sample
-------------------------
Copyright (c) 2012 ForgeRock AS
This work is licensed under a Creative Commons Attribution-
NonCommercial-NoDerivs 3.0 Unported License. See
http://creativecommons.org/licenses/by-nc-nd/3.0/

This sample demonstrates how perform an asynchronous action from a reconciliation.

To try the sample, follow these steps.

1. Copy the sample configuration and data.

$ cd /path/to/openidm
$ cp -r samples/sample8/conf samples/sample8/workflow.

2. Start OpenIDM.

$ ./startup.sh

3. Run reconciliation.

$ curl -u openidm-admin:openidm-admin -X POST "http://localhost:8080/openidm/sync?_action=recon&mapping=systemXmlfileAccounts_managedUser"

4. The reconciliation starts an approval workflow for each ABSENT user.
These workflows (managedUserApproval) wait for approval.

5. Query the started workflow task instances.

$curl -u openidm-admin:openidm-admin "http://localhost:8080/openidm/workflow/taskinstance?_queryId=query-all-ids"

sample response:
{"result":[{"_id":"26","name":"Evaluate request"},{"_id":"16","name":"Evaluate request"}]}

6. Approve the requests.

$curl -u openidm-admin:openidm-admin -X POST "http://localhost:8080/openidm/workflow/taskinstance/16?_action=complete" --data {"requestApproved": "true"}
$curl -u openidm-admin:openidm-admin -X POST "http://localhost:8080/openidm/workflow/taskinstance/26?_action=complete" --data {"requestApproved": "true"}

7. Query the managed users created by the async reconciliation after the approval step.

$curl -u openidm-admin:openidm-admin "http://localhost:8080/openidm/managed/user?_queryId=query-all-ids"