7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * Copyright (c) 2014 ForgeRock AS. All rights reserved.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * The contents of this file are subject to the terms
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * of the Common Development and Distribution License
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * (the License). You may not use this file except in
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * compliance with the License.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * You can obtain a copy of the License at
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * See the License for the specific language governing
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * permission and limitations under the License.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * When distributing Covered Code, include this CDDL
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * Header Notice in each file and include the License file
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * If applicable, add the following below the CDDL Header,
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * with the fields enclosed by brackets [] replaced by
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * your own identifying information:
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel * "Portions Copyrighted [year] [name of copyright owner]"
4b4c3a2028eea921136be5b4717c69c074b4982eLana---------------------------
4b4c3a2028eea921136be5b4717c69c074b4982eLanaThis sample demonstrates how to perform an asynchronous action from a
17ac9740889daa3a239caefc6fb8615c60b5a6d1Lana Frosthttp://openidm.forgerock.org/doc/bootstrap/samples-guide/#more-sample-9
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel $ curl -k -H "Content-type: application/json" -u "openidm-admin:openidm-admin" -X POST "https://localhost:8443/openidm/recon?_action=recon&mapping=systemXmlfileAccounts_managedUser"
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel The reconciliation starts an approval workflow for each ABSENT user.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel These workflows (managedUserApproval) wait for approval.
e90f327dcf46d61cf847f239ef5af5a9ca431449Mike Jang 3. Using your browser, open https://localhost:8443/ .
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel 4. In your "My Tasks" list, you should see two requests for "Evaluate request".
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel Click on "Evaluate request" to expand the list, and then click "Details" for
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel each item. Choose whether or not to approve the request. If you choose "Yes",
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel that user will be created. If you choose "No", it will not be.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel 5. After completing all pending tasks, go to the "Users" tab to see the list of
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel managed/users defined in the system. Only those you approved should be listed.
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel $ curl -k -u openidm-admin:openidm-admin "https://localhost:8443/openidm/workflow/taskinstance?_queryId=query-all-ids&_prettyPrint=true"
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "result" : [ {
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "processVariables" : { },
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "processDefinitionId" : "managedUserApproval:1:3",
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "taskLocalVariables" : { },
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "activityInstanceVariables" : { },
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "deleted" : false,
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "suspended" : false,
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "processVariables" : { },
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "processDefinitionId" : "managedUserApproval:1:3",
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "taskLocalVariables" : { },
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "activityInstanceVariables" : { },
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "deleted" : false,
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "suspended" : false,
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel $ 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"
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel 5. Query the managed users created by the asynchronous reconciliation after
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel $ curl -k -u openidm-admin:openidm-admin "https://localhost:8443/openidm/managed/user?_queryId=query-all-ids&_prettyPrint=true"
7d83b6a03bd7b63f2eb6404d6cc1e4c074391ea7Jake Feasel "result" : [ {