Navigating the Organization Model
The DirectoryService API enables applications to navigate the organization model to locate a particular organizational entity for work allocation.
The following diagram shows an example of how calls to the Directory Services API can be used to navigate the organization model.
The following step-by-step descriptions correspond to the numbered steps in Figure 7. 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 Navigating the Organization Model — Service Connector API Example (Java).)
Procedure
-
Use the
getOrgModel operation to get details about the entities in an organization model identified by its major version number (you can obtain the major version numbers using the
listOrgModelVersions operation).
The response from the getOrgModel operation provides GUIDs for all entities in the organization model.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:org="http://orgmodel.api.de.bpm.tibco.com"> <soapenv:Header/> <soapenv:Body> <org:getOrgModel model-version="2" include-resource-counts="true" include-calendar-alias="false"/ </soapenv:Body> </soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <getOrgModelResponse model-version="2" xmlns="http://orgmodel.api.de.bpm.tibco.com"> <capability guid="_xI4ikMpPEd64gM7QE8RwxA" label="Can Travel" name="CanTravel" resource-count="0" xmlns=""/> <capability guid="_0K47AMpPEd64gM7QE8RwxA" label="Consulting Rate" name="ConsultingRate" resource-count="0" xmlns=""> <qualifier guid="_WjnlAPl_Ed6Q1ZnFgJo3zg" label="Consulting Rate Qualifier" name="ConsultingRateQualifier" type="Decimal"/> </capability> <capability guid="_BJKvUMpQEd64gM7QE8RwxA" label="Degree" name="Degree" resource-count="0" xmlns=""> <qualifier guid="_B55BoMpQEd64gM7QE8RwxA" label="Degree Qualifier" name="DegreeQualifier" type="String"/> </capability> <capability guid="_FhcXIMpQEd64gM7QE8RwxA" label="Extended End Of Day" name="ExtendedEndOfDay" resource-count="0" xmlns=""> <qualifier guid="_G1L28MpQEd64gM7QE8RwxA" label="Extended End Of Day Qualifier" name="ExtendedEndOfDayQualifier" type="Time"/> </capability> <capability guid="_LlK0IMpQEd64gM7QE8RwxA" label="Language Spoken" name="LanguageSpoken" resource-count="0" xmlns=""> <qualifier guid="_NwMhQMpQEd64gM7QE8RwxA" label="Language Spoken Qualifier" name="LanguageSpokenQualifier" type="EnumSet"> <enum-val>Chinese (Mandarin)</enum-val> <enum-val>Japanese</enum-val> . . . <resource-attribute guid="__HXIQMpSEd64gM7QE8RwxA" label="Last Name" name="LastName" type="String" xmlns=""/> <resource-attribute guid="_BBG4IMpTEd64gM7QE8RwxA" label="Full Name" name="FullName" type="String" xmlns=""/> <resource-attribute guid="_CRQ4cMpTEd64gM7QE8RwxA" label="Pay Hourly Rate" name="PayHourlyRate" type="Decimal" xmlns=""/> <resource-attribute guid="_FN6PwMpTEd64gM7QE8RwxA" label="Pay Is Hourly" name="PayIsHourly" type="Boolean" xmlns=""/> <resource-attribute guid="_HvSAUMpTEd64gM7QE8RwxA" label="Payments Per Year" name="PaymentsPerYear" type="Integer" xmlns=""/> <resource-attribute guid="_Jwwv4MpTEd64gM7QE8RwxA" label="Scheduled Break Time" name="ScheduledBreakTime" type="Time" xmlns=""/> </getOrgModelResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
-
Search for resources using the
findResources operation.
The request can include either resource names to search for, or one or more organization model entities for which associated resources are returned. (If required, the request can include a combination of entity GUIDs and resource names.)
The response identifies the resources found in the search.
<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="2" current-only="false" > <entity-ref guid="__O368MpREd64gM7QE8RwxA" 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="2" xmlns="http://resource.api.de.bpm.tibco.com"> <resource guid="98C600DC-0117-4DA5-8B8C-14600377F121" label="Tony Pulis" name="Tony Pulis" xmlns=""/ </findResourcesResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
-
Get details, including all current attribute values, for the desired resources using the
getResource operation.
<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="2" > <guid > 98C600DC-0117-4DA5-8B8C-14600377F121</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="2" container-name="Eastern" guid="98C600DC-0117-4DA5-8B8C-14600377F121" label="Tony Pulis" model-version="2" name="Tony Pulis" resource-type="HUMAN" xmlns=""> <location guid="_jqpJ4MpREd64gM7QE8RwxA" label="Palo Alto" name="PaloAlto"/> <position guid="__O368MpREd64gM7QE8RwxA" label="Sales Managers" name="SalesManagers"/> <group guid="_PishwKm-EeGVBPh-9xEbfQ" label="Create Resource Admin" name="CreateResourceAdmin"/> <capability guid="_iGzOAMpQEd64gM7QE8RwxA" label="Orientation Completed" name="OrientationCompleted"/> <capability guid="_tCpQgMpQEd64gM7QE8RwxA" label="Technical Rating" name="TechnicalRating"> <qualifier-value>10</qualifier-value> </capability> <privilege guid="_dfZioKm9EeGVBPh-9xEbfQ" label="de_create_resource_admin" name="de_create_resource_admin"> <group guid="_PishwKm-EeGVBPh-9xEbfQ" label="Create Resource Admin" name="CreateResourceAdmin"/> </privilege> <privilege guid="_-lRz0Km8EeGVBPh-9xEbfQ" label="de_browse_model" name="de_browse_model"> <group guid="_Jb8oYMpREd64gM7QE8RwxA" label="Employees" name="Employees"/> </privilege> <attribute guid="_looEEMpSEd64gM7QE8RwxA" label="Cell Phone" name="CellPhone" type="String"/> <attribute guid="_n2CW0MpSEd64gM7QE8RwxA" label="Clearance Expiration" name="ClearanceExpiration" type="DateTime"/> . . . <attribute guid="_HvSAUMpTEd64gM7QE8RwxA" label="Payments Per Year" name="PaymentsPerYear" type="Integer"/> <attribute guid="_Jwwv4MpTEd64gM7QE8RwxA" label="Scheduled Break Time" name="ScheduledBreakTime" type="Time"/> <ldap-reference ldap-alias="easyAs" ldap-dn="OU=Tony Pulis, OU=London, OU=AllEmployees, O=easyAsInsurance"/> </resource> </getResourceResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>