README revision 856298a52144e5cf88ebef4f32fd6eb6616c2213
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder * Copyright (c) 2014 ForgeRock AS. All rights reserved.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * The contents of this file are subject to the terms
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * of the Common Development and Distribution License
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * (the License). You may not use this file except in
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * compliance with the License.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * You can obtain a copy of the License at
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * http://forgerock.org/license/CDDLv1.0.html
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * See the License for the specific language governing
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder * permission and limitations under the License.
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder * When distributing Covered Code, include this CDDL
b7839add0728fef3cbb28244373661db382f6588Christian Maeder * Header Notice in each file and include the License file
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski * at http://forgerock.org/license/CDDLv1.0.html
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder * If applicable, add the following below the CDDL Header,
760ae19a92dde8249679a674f93f58d26a7c5f6bChristian Maeder * with the fields enclosed by brackets [] replaced by
760ae19a92dde8249679a674f93f58d26a7c5f6bChristian Maeder * your own identifying information:
88c800932dd7053322501ea2039d9f234be6866cKlaus Luettich * "Portions Copyrighted [year] [name of copyright owner]"
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder---------------------------
8410667510a76409aca9bb24ff0eda0420088274Christian MaederThis sample demonstrates how to perform an asynchronous action from a
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichFor documentation pertaining to this example see:
824125ad97b34671bd7ea72655967f46caeb0004Christian Maederhttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample9
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder 1. Start OpenIDM with the configuration for sample 9.
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maeder $ curl -k -H "Content-type: application/json" -u "openidm-admin:openidm-admin" -X POST "https://localhost:8443/openidm/recon?_action=recon&mapping=systemXmlfileAccounts_managedUser"
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till Mossakowski The reconciliation starts an approval workflow for each ABSENT user.
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich These workflows (managedUserApproval) wait for approval.
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder 3. Using your browser, open https://localhost:8443/selfservice/ .
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder 4. In your "My Tasks" list, you should see two requests for "Evaluate request".
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder Click on "Evaluate request" to expand the list, and then click "Details" for
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder each item. Choose whether or not to approve the request. If you choose "Yes",
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder that user will be created. If you choose "No", it will not be.
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder 5. After completing all pending tasks, go to the "Users" tab to see the list of
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder managed/users defined in the system. Only those you approved should be listed.
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder 3. Query the started workflow task instances.
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $ curl -k -u openidm-admin:openidm-admin "https://localhost:8443/openidm/workflow/taskinstance?_queryId=query-all-ids&_prettyPrint=true"
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder "result" : [ {
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder "createTime" : "2014-04-18T16:12:14.125-07:00",
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder "processVariables" : { },
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder "processDefinitionId" : "managedUserApproval:1:3",
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder "taskLocalVariables" : { },
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder "activityInstanceVariables" : { },
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich "deleted" : false,
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich "suspended" : false,
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder "createTime" : "2014-04-18T16:12:14.178-07:00",
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder "processVariables" : { },
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder "processDefinitionId" : "managedUserApproval:1:3",
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder "taskLocalVariables" : { },
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers "activityInstanceVariables" : { },
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maeder "deleted" : false,
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder "suspended" : false,
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $ curl -k -u openidm-admin:openidm-admin -X POST "https://localhost:8443/openidm/workflow/taskinstance/15?_action=complete" --data '{"requestApproved": "true"}' -H "Content-Type: application/json"
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder 5. Query the managed users created by the asynchronous reconciliation after
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $ curl -k -u openidm-admin:openidm-admin "https://localhost:8443/openidm/managed/user?_queryId=query-all-ids&_prettyPrint=true"
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder "result" : [ {