Moving a Resource to Different LDAP Container

You can change the LDAP references of a resource, for instance to move it to a different LDAP container. This may be desired if a resource has moved to a different part of the company.

The following diagram shows an example of how to move a resource.

Moving a Resource to a Different LDAP Container

The following step-by-step descriptions correspond to the numbered steps in the illustration above. Note that the descriptions are from a web service operation point of view, and provide an example of performing the operations using the web service API (SOAP). (For an equivalent example using the Service Connector API (Java), see Moving a Resource to a Different LDAP Container — Service Connector API Example (Java).)

Procedure

  1. Find a resource for user selection.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://resource.api.de.bpm.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <res:findResources model-version="1" current-only="false">
             <resource-name>Clint Hill</resource-name>
          </res:findResources>
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <findResourcesResponse model-version="1" xmlns="http://resource.api.de.bpm.tibco.com">
             <resource guid="9E5E4A4A-0074-4264-8692-B3A99E1E3CC7" label="Clint Hill" name="Clint Hill" xmlns=""/>
          </findResourcesResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  2. Get resource details for confirmation.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://resource.api.de.bpm.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <res:getResource model-version="1">
             <guid>9E5E4A4A-0074-4264-8692-B3A99E1E3CC7</guid>
          </res:getResource>
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <getResourceResponse xmlns="http://resource.api.de.bpm.tibco.com">
             <resource container-id="52" container-name="easyAs" guid="9E5E4A4A-0074-4264-8692-B3A99E1E3CC7" label="Clint Hill" model-version="1" name="Clint Hill" resource-type="HUMAN" xmlns="">
                <ldap-reference ldap-alias="easyAs" ldap-dn="OU=Clint Hill, OU=Swindon, OU=AllEmployees, O=easyAsInsurance"/>
             </resource>
          </getResourceResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  3. List LDAP containers for selection of the destination LDAP container.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dir="http://directory.api.de.bpm.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <dir:listContainers/>
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <listContainersResponse xmlns="http://directory.api.de.bpm.tibco.com">
             <ldap-container active="true" id="51" last-accessed="2012-09-14T09:38:05.483Z" name="multi-container" xmlns="">
                <primary-ldap ldap-alias="deLdap3" ldap-query="(objectClass=person)" resource-name-attributes="uid"/>
                <secondary-ldap ldap-alias="deLdap2" ldap-query="(objectclass=person)" resource-name-attributes="cn">
                   <primary-link primary-attribute="displayname" secondary-attribute="uid"/>
                </secondary-ldap>
             </ldap-container>
             <ldap-container active="true" id="52" last-accessed="2012-09-14T09:39:14.940Z" name="easyAs" xmlns="">
                <primary-ldap ldap-alias="easyAs" ldap-query="(objectclass=person)" resource-name-attributes="ou"/>
             </ldap-container>
          </listContainersResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  4. Get candidates from the destination LDAP container.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dir="http://directory.api.de.bpm.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <dir:listCandidateResources container-id="51" include="NON-EXISTING"/>
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <listCandidateResourcesResponse container-id="51" include="NON-EXISTING" xmlns="http://directory.api.de.bpm.tibco.com">
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Clint Hill, OU=GlobalSales, O=insuranceSales" name="Clint Hill" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=chill, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=John Eustace, OU=GlobalSales, O=insuranceSales" name="John Eustace" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=jeustace, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Jon Parkin, OU=GlobalSales, O=insuranceSales" name="Jon Parkin" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=jparkin, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Leon Court, OU=GlobalSales, O=insuranceSales" name="Leon Court" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=lcourt, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Marlon Broomes, OU=GlobalSales, O=insuranceSales" name="Marlon Broomes" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=mbroomes, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Richard Cresswell, OU=GlobalSales, O=insuranceSales" name="Richard Cresswell" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=rcresswell, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Steve Simonsen, OU=GlobalSales, O=insuranceSales" name="Steve Simonsen" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=ssimonsen, OU=employees, O=insuranceServices"/>
             </candidate>
             <candidate ldap-alias="deLdap3" ldap-dn="UID=Tony Pulis, OU=GlobalSales, O=insuranceSales" name="Tony Pulis" xmlns="">
                <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=tpulis, OU=employees, O=insuranceServices"/>
             </candidate>
          </listCandidateResourcesResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  5. Update resource with the selected candidate details.

    The updateResource request must include an LDAP reference for each LDAP source referenced by the LDAP Container. In this example the container references two LDAP sources, deLdap3 and deLdap2.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://resource.api.de.bpm.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
          <res:updateResource model-version="1">
             <resource guid="9E5E4A4A-0074-4264-8692-B3A99E1E3CC7">
                <ldap-reference container-id="51" ldap-alias="deLdap3" ldap-dn="UID=Clint Hill, OU=GlobalSales, O=insuranceSales">
                   <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=chill, OU=employees, O=insuranceServices"/>
                </ldap-reference>
             </resource>
          </res:updateResource>
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <updateResourceResponse xmlns="http://resource.api.de.bpm.tibco.com">
             <resource container-id="51" container-name="multi-container" guid="9E5E4A4A-0074-4264-8692-B3A99E1E3CC7" label="Clint Hill" model-version="1" name="Clint Hill" resource-type="HUMAN" xmlns="">
                <ldap-reference ldap-alias="deLdap3" ldap-dn="UID=Clint Hill, OU=GlobalSales, O=insuranceSales">
                   <secondary-ref ldap-alias="deLdap2" ldap-dn="UID=chill, OU=employees, O=insuranceServices"/>
                </ldap-reference>
             </resource>
          </updateResourceResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>