Configuring Candidate Queries for Dynamic Organizations
It is possible to construct the Base-DN and LDAP query of a candidate query in such a way that it identifies different resources for each instance of the dynamic organization model.
Prerequisites
- You must have an LDAP container defined from which the resource candidates can be obtained.
- There must be an organization unit that has been designated for an extension point when it was defined in TIBCO Business Studio, that is, a model template has been defined for the organization unit. You can determine organization units that have been designated for an extension point by the icon next to the organization unit name. For example:
Substitution Variables
To allow you to specify that each instance of the dynamically generated organization unit be populated with different resources, two substitution variables are available for use in a candidate query:
- {root-dn} - The DN of the LDAP entry that initiated the organization model template instance. Generally, this substitution variable is used in the Base DN of the candidate query configuration. This is used in the example that is shown below.
- {root-name} - The name assigned to the root organization unit of the organization model instance; that is, the value of the LDAP attribute named in the extension point. Generally, this substitution variable is used in the Query of the candidate query configuration. Note that this variable is not used in the example that is shown below, but it is available for use if your LDAP source is set up in such a way that it needs to be queried.
Note that substitution variables must be enclosed in braces { }, and they are case insensitive.
These substitution variables will take their values according to each instance from the LDAP entry that the instance comes from. Using the following example, the {root-dn} for the currently selected LDAP entry is "ou=London,ou=AllEmployees,o-easyAsInsurance". The Paris and Swindon entries would have similar DNs. The {root-name} for the three organization units in this example are London, Paris, and Swindon.
Procedure
- From the Organization Browser, click the Organizations button, then expand the hierarchy and select the organization unit that contains an extension point (that is, one that has a icon next to the organization unit name).
- Click the View Template link.
-
On the
Dynamic Organization Template dialog, expand the hierarchy to view the organization structure, select the position you want to populate in each dynamically generated instance of the template, then click
Edit Candidate Query.
- If there is already a candidate query defined for the selected position, it is displayed. You can use the information in Step 4 to edit the candidate query, or you can delete the existing candidate query by clicking the Delete Query () button.
- If there has not been a candidate query defined for the selected position, click Add Candidate Query then use the information in Step 4 to define the candidate query.
- Configure the candidate query using the fields on the Candidate Query dialog, as follows:
- Click Save Changes to save the edited/new candidate query and close the Candidate Query dialog.
- Click Close to close the Dynamic Org Template dialog.
Candidate Query Configuration for a Dynamic Organization Example
- Your LDAP source looks like this:
- The LDAP source contains the following attributes for each of the LDAP entries (resources):
Each LDAP entry contains a jobtitle attribute. The query looks for the entries in which the value of this attribute is "SalesRep".
- You have configured the extension point for the dynamic organization as follows:
Note that this is the same extension point configuration described in Configuring Dynamic Organization Model Extension Points.
- The candidate query for the "SalesPerson" position in the model template is configured as follows:
After the candidate query is invoked by the properties in the DE.Properties file (for more information, see Candidate Queries), the organization model looks like this:
Three instances of the model template were generated, one for each instance of {root-dn}: ou=Paris,ou=AllEmployees,o=easyAsInsurance, ou=London,ou=AllEmployees,o=easyAsInsurance, and ou=Swindon,ou=AllEmployees,o=easyAsInsurance
And each of the instances are populated with the resources whose jobtitle attribute equals "SalesRep" for each of the branches.
Notice that the (?) to the right of the check box indicates that the position has a candidate query defined.