Issue 4379: Navigation from a BusinessUnit to its children is too complicated (osf-ftf) Source: Adaptive (Mr. Pete Rivett, pete.rivett(at)adaptive.com) Nature: Revision Severity: Significant Summary: BusinessUnits seems unnecessarily hard, as shown in the following pseudocode. Assume I'm starting with the BusinessUnit in a variable called myBusinessUnit, and that I've already set up variables for the myOrgFinder and that I know the name of the orgmodel. myId = myBusinessUnit.get_id() // get the ID for the BusinessUnit mySubject = myOrgFinder.find_subject_by_external_id(myId) // find the Subject for it, treating myId as 'external' to the OrgStructure myStructure = myOrgFinder.find_orgstructure_by_name("my model name", "org hierarchy structure", "some version identifier") //get the appropriate org structure by 'knowing' the right name myNodeList = myStructure.list_org_elements_with_subject (mySubject.identifier, 1, 0, myOrgElementIter) // get the node for the BusinessUnit within the structure - assuming there is only one myNode=myNodeList[0] // get the node from the list myChildrenNodes = myNode.listChildren(MAXLIST, MAXITER, myOrgElementIter) // navigate to the children nodes for each childNode in myChildrenNodes do childData = childNode.getData() // get the OrgElement data nextChildSubject = childData.subject // extract the subject childExtId = nextChildSubject.external_identifier // extract the external id to allow lookup in the Address Book Now there is the problem of not knowing what type of object these ids represent, to know whether to call myAddressBook.find_business_unit_by_id, or myAddressBook.find_person_by_id. Do I just need to try one and if it fails try the other? Resolution: Revised Text: Actions taken: June 20, 2001: received issue Discussion: End of Annotations:===== Issue: Navigation from a BusinessUnit to its children is too complicated Source: Adaptive Ltd. (Mr. Pete Rivett, pete.rivett@adaptive.com) Nature: Revision Severity: Significant Summary: A conceptually simple navigation from a BusinessUnit to its children BusinessUnits seems unnecessarily hard, as shown in the following pseudocode. Assume I'm starting with the BusinessUnit in a variable called myBusinessUnit, and that I've already set up variables for the myOrgFinder and that I know the name of the orgmodel. myId = myBusinessUnit.get_id() // get the ID for the BusinessUnit mySubject = myOrgFinder.find_subject_by_external_id(myId) // find the Subject for it, treating myId as 'external' to the OrgStructure myStructure = myOrgFinder.find_orgstructure_by_name("my model name", "org hierarchy structure", "some version identifier") //get the appropriate org structure by 'knowing' the right name myNodeList = myStructure.list_org_elements_with_subject (mySubject.identifier, 1, 0, myOrgElementIter) // get the node for the BusinessUnit within the structure - assuming there is only one myNode=myNodeList[0] // get the node from the list myChildrenNodes = myNode.listChildren(MAXLIST, MAXITER, myOrgElementIter) // navigate to the children nodes for each childNode in myChildrenNodes do childData = childNode.getData() // get the OrgElement data nextChildSubject = childData.subject // extract the subject childExtId = nextChildSubject.external_identifier // extract the external id to allow lookup in the Address Book Now there is the problem of not knowing what type of object these ids represent, to know whether to call myAddressBook.find_business_unit_by_id, or myAddressBook.find_person_by_id. Do I just need to try one and if it fails try the other? Resolution: Revised Text: Actions taken: