Updating Push Destinations for Resources

Calls to OrgResourceService and OrgModelService APIs can be used to update push destinations for resources.

See also: OrgResourceService and OrgModelService

Updating Push Destinations for Resources

The following step-by-step descriptions correspond to the numbered steps in 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 Updating Push Destinations for Resources — Service Connector API Example (Java).)

Procedure

  1. Use the findResources operation to get details about the resources in an organization model.

    The request identifies the organizational entity, which can be obtained using the getOrgModel operation.

    The response from the findResources operation provides a list of resources that are associated with the given organizational entity.

    <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="9" current-only="false" > <entity-ref guid="_-j8iYMoOEeG-IPt6GUFXxA" deep-search="false"/ >       </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="9" xmlns="http://resource.api.de.bpm.tibco.com">
             <resource guid="tibco-admin" label="tibco-admin" name="tibco-admin" xmlns=""/>
             <resource guid="27F2BC92-816E-4C7E-A4B7-23018E151873" label="Clint Hill" name="Clint Hill" xmlns=""/>
             <resource guid="2704180A-9899-44B1-8962-18FBDE1F1045" label="Jon Parkin" name="Jon Parkin" xmlns=""/>
          </findResourcesResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  2. Use the getResource operation to get full details of the identified resource(s), including the push destinations already defined for the resource(s).
    <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="9" > <guid > 27F2BC92-816E-4C7E-A4B7-23018E151873</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="1" container-name="Regional" guid="27F2BC92-816E-4C7E-A4B7-23018E151873" label="Clint Hill" model-version="9" name="Clint Hill" resource-type="HUMAN" xmlns="">
                <position guid="_FF6akMoPEeG-IPt6GUFXxA" label="Support Rep" name="SupportRep"/>
                <position guid="_PqB5kMoPEeG-IPt6GUFXxA" label="IT Manager" name="ITManager"/>
                <position guid="_-j8iYMoOEeG-IPt6GUFXxA" label="Sales Rep" name="SalesRep"/>
                <position guid="_8lLvoMoOEeG-IPt6GUFXxA" label="Sales Manager" name="SalesManager"/>
                <position guid="_Gj8e0MoPEeG-IPt6GUFXxA" label="Support Manager" name="SupportManager"/>
                <position guid="_RcJ-gMoPEeG-IPt6GUFXxA" label="IT Rep" name="ITRep"/>
     <push-destination channel-id="openspaceEmailPush_DefaultChannel" channel-type="EmailChannel" enabled="true" name="" >                <value > stower@microgroup.com</value > /push-destination
                <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. Use the updatePushDestinations operation to set push destinations for the specified resource(s).

    An empty response indicates a successful execution.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:org="http://orgmodel.api.de.bpm.tibco.com">
       <soapenv:Header/>
       <soapenv:Body>
    <org:updatePushDestinations model-version="9" entity-type="RESOURCE" guid="27F2BC92-816E-4C7E-A4B7-23018E151873"  > <set-destination name="Office" channel-type="EmailChannel" channel-id="workspaceEmailPush_DefaultChannel" enabled="true" > <value > supportMgr@megaCorp.com</value > </set-destination > </org:updatePushDestinations
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <updatePushDestinationsResponse xmlns="http://orgmodel.api.de.bpm.tibco.com"/>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>