|
hey everyone i am having a hard time figuring this out, just seeing if anyone has any ideas..
the process.auditEvent are just like Print outs..so i can see where the data is getting lost..i am losing the data on the second container search right after the SearchByFilter..i know this cause the length of array RoleResult is 0..I even tried replacing rolefilt with what should i exactly be there and still cant get the requester..What i am trying to do with this code is take a person based on where sits in tree is going to be who approves him for certain role..so role is not dynamic just where they could be in tree. and i have all that working just some how that second search doenst seem to be working...thanks for your help ahead of time
process.auditEvent(person.get()):
//gets ther user's organization from self enroling
var thisPerson = person.get();
var locationName = thisPerson.getProperty("l");
if (locationName.length < 1)
{
process.setResults("SF" , "Location attribute was not passed correctly.");
}
//find user's organization
var filt = "(erglobalid =" + locationName[0] + ")";
process.auditEvent(filt);
var locationSearch = new ContainerSearch();
//find user's organization in the tree
var orgResult = locationSearch.searchByFilter("OrganizationalUnit", filt, 2);
var org = orgResult[0];
process.auditEvent(org);
process.auditEvent(orgResult.length);
//find the role appropriate and fwd the request
var rolefilt = "(erparent=erglobalid=" + org.getProperty("erglobalid")[0] + "*);
process.auditEvent(rolefilt);
var roleSearch = new ContainerSearch();
var roleResult = rolesearch.searchByFilter("Role", rolefilt, 2);
process.auditEvent(roleResult.length);
return new Participant(ParticipanyType.ROLE, roleResult[0]);
some help understanding what is going on
filt and rolefilt are filters with how the search is being done..rolefilt for example = "erparent=erglobalid=10732342933*)
searchbyFilter help http://publib.boulder.ibm.com/tividd/td/ITIM/SC32-1149-02/en_US/HTML/im451_poag38.htm#common_features1014972
containerSearch.searchByFilter(profileName, filter, scope)
profileName the name of the organizational container profile to use
filter LDAP search filter that defines the criteria for returned containers to meet. the filter must be in the format defined by RFC2254
scope optional search scope. 1 use for one level scope and 2 for sub tree scope..
returns an array of directoryObjects representing the results of the search..
let me know if this will help more
|
|
|
|
|
|
|
|