Configuring a Candidate Query
Candidate queries are configured using the setCandidateQueries operation.
The following diagram shows an example of configuring a candidate query.
The following step-by-step descriptions correspond to the numbered steps in Figure 13. 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 Setting Candidate Queries — Service Connector API Example (Java).)
Procedure
-
Get an organization model with candidate queries. The response will also include candidate queries. Note, however, that this example shows that none are currently configured.
<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="-1" include-candidate-queries="true"/> </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="1" xmlns="http://orgmodel.api.de.bpm.tibco.com"> <group guid="_D61a8GfOEeOiGOb4k4LDUg" label="Group1" name="Group1" xmlns=""> <allocation-method method="ANY"/> <group guid="_E33q8GfOEeOiGOb4k4LDUg" label="Group3" name="Group3"> <allocation-method method="ANY"/> </group> </group> <group guid="_ETiO0GfOEeOiGOb4k4LDUg" label="Group2" name="Group2" xmlns=""> <allocation-method method="ANY"/> <group guid="_F13kQGfOEeOiGOb4k4LDUg" label="Group5" name="Group5"> <allocation-method method="ANY"/> <group guid="_GzecAGfOEeOiGOb4k4LDUg" label="Group7" name="Group7"> <allocation-method method="ANY"/> </group> </group> </group> <organization guid="_k44DgWDiEeOXirad8gzrtg" label="Organization" name="Organization" xmlns=""> <schema-type guid="_k44DiWDiEeOXirad8gzrtg" label="Public Company" name="PublicCompany"/> <allocation-method method="ANY"/> <org-unit guid="_4WIGYGDiEeOXirad8gzrtg" label="Head Office" name="HeadOffice"> <schema-type guid="_k44Di2DiEeOXirad8gzrtg" label="Department Type" name="DepartmentType"/> <allocation-method method="ANY"/> <position guid="_5lk8EGDiEeOXirad8gzrtg" ideal-number="1" label="Chief Executive" name="ChiefExecutive">
<schema-type guid="_k44DkWDiEeOXirad8gzrtg" label="Standard Position Type" name="StandardPositionType"/> <allocation-method method="ANY"/> </position> <org-unit guid="_Y9FC0HnvEeOXwIHqtnmxgg" label="Board Of Directors" name="BoardOfDirectors"> <schema-type guid="_k44Di2DiEeOXirad8gzrtg" label="Department Type" name="DepartmentType"/> <allocation-method method="ANY"/> <position guid="_aPaNYHnvEeOXwIHqtnmxgg" ideal-number="1" label="Director" name="Director"> <schema-type guid="_k44DkWDiEeOXirad8gzrtg" label="Standard Position Type" name="StandardPositionType"/> <allocation-method method="ANY"/> </position> </org-unit> </org-unit> <org-unit guid="_6dgpoGDiEeOXirad8gzrtg" label="Branches" name="Branches"> <allocation-method method="ANY"/> </org-unit> </organization> </getOrgModelResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
-
Set the candidate queries.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:org="http://orgmodel.api.de.bpm.tibco.com"> <soapenv:Header/> <soapenv:Body> <org:setCandidateQueries> <assignment container-id="73" query="(objectclass=person)" base-dn="ou=London" search-scope="ONELEVEL"> <position>_aPaNYHnvEeOXwIHqtnmxgg</position> </assignment> <assignment container-id="73" query="(objectclass=person)" base-dn="ou=Swindon" search-scope="ONELEVEL"> <group>_E33q8GfOEeOiGOb4k4LDUg</group> </assignment> </org:setCandidateQueries> </soapenv:Body> </soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <setCandidateQueriesResponse xmlns="http://orgmodel.api.de.bpm.tibco.com"/> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
-
Get the organization model again to confirm configuration.
<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="-1" include-candidate-queries="true"/> </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="1" xmlns="http://orgmodel.api.de.bpm.tibco.com"> <group guid="_D61a8GfOEeOiGOb4k4LDUg" label="Group1" name="Group1" xmlns=""> <allocation-method method="ANY"/> <group guid="_E33q8GfOEeOiGOb4k4LDUg" label="Group3" name="Group3"> <allocation-method method="ANY"/> <candidate-query base-dn="OU=Swindon" container-id="73" query="(objectclass=person)" search-scope="ONELEVEL"/ </group> </group> <group guid="_ETiO0GfOEeOiGOb4k4LDUg" label="Group2" name="Group2" xmlns=""> <allocation-method method="ANY"/> <group guid="_F13kQGfOEeOiGOb4k4LDUg" label="Group5" name="Group5"> <allocation-method method="ANY"/> <group guid="_GzecAGfOEeOiGOb4k4LDUg" label="Group7" name="Group7"> <allocation-method method="ANY"/> </group> </group> </group> <organization guid="_k44DgWDiEeOXirad8gzrtg" label="Organization" name="Organization" xmlns=""> <schema-type guid="_k44DiWDiEeOXirad8gzrtg" label="Public Company" name="PublicCompany"/> <allocation-method method="ANY"/> <org-unit guid="_4WIGYGDiEeOXirad8gzrtg" label="Head Office" name="HeadOffice"> <schema-type guid="_k44Di2DiEeOXirad8gzrtg" label="Department Type" name="DepartmentType"/> <allocation-method method="ANY"/> <position guid="_5lk8EGDiEeOXirad8gzrtg" ideal-number="1" label="Chief Executive" name="ChiefExecutive"> <schema-type guid="_k44DkWDiEeOXirad8gzrtg" label="Standard Position Type" name="StandardPositionType"/> <allocation-method method="ANY"/> </position> <org-unit guid="_Y9FC0HnvEeOXwIHqtnmxgg" label="Board Of Directors" name="BoardOfDirectors"> <schema-type guid="_k44Di2DiEeOXirad8gzrtg" label="Department Type" name="DepartmentType"/> <allocation-method method="ANY"/> <position guid="_aPaNYHnvEeOXwIHqtnmxgg" ideal-number="1" label="Director" name="Director"> <schema-type guid="_k44DkWDiEeOXirad8gzrtg" label="Standard Position Type" name="StandardPositionType"/> <allocation-method method="ANY"/> <candidate-query base-dn="OU=London" container-id="73" query="(objectclass=person)" search-scope="ONELEVEL"/ </position> </org-unit> </org-unit> <org-unit guid="_6dgpoGDiEeOXirad8gzrtg" label="Branches" name="Branches"> <allocation-method method="ANY"/> </org-unit> </organization> </getOrgModelResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Copyright © Cloud Software Group, Inc. All rights reserved.