Expand my Community achievements bar.

Finding parent group(s)

Avatar

Level 2

It seems that UserLookup service doesn't provide a way to find groups to which a user belong. Solution would be to try to compare wanted user with all members of all groups but it's very inefficient.

My scenario is:

There is a workflow in which document is created in one organization and delivered to another organization. It is delivered do dedicated user or department in an organization but before document is delivered to that user/group it has to be registered by office administration of that organization. My problem is: how to detect which administrator group is responsible for given destination user or group.

For example, if document destination is USER1 (or DEP1) and that user or group belongs to ORG1 it woud be easy to detect that first step should be assigned to ORG1_ADMINS.

Now only solution is to keep those relationship in custom database and use SQL query to retrieve it but that means duplicated user/group administration.

Any  other suggestions?

Thanks in advance,

Zeljko Vranic

6 Replies

Avatar

Level 10

You can find the group (OU attribute) of a given user name using LDAP Query component.

See the image attached.

Nith

Avatar

Level 2

$Nith$, thanks for answering. That would be helpful if we had control or full access to LDAP directory. But we had to create hybrid domain and organize our groups inside Livecycle user/group hierarchy. We cannot rely on OU field in LDAP and we cannot change it (it's read only for our livecycle application).

I hope there is some Java API call for that...

Avatar

Level 10

yeah, here is the material which might help you to address your problem using java API

Avatar

Level 2

Sorry, I wasn't clear enough. I don't need to (can't) access LDAP so I don't need LDAP API, I was hoping for API to access Livecycle User <==> Group relationships which are stored in LC database.

Anyway, thanks for trying $Nith$!

Avatar

Level 2

getDirectGroupMemberships() method from the Principal class is good suggestion, thanks for that, but I ran into some other problems which I managed to solve in the end.

I created a Livecycle component that should give me as output list of parent groups and I can get that with suggested method but I have problem with input. User class that is used in Workspace in UserLookup service is: com.adobe.idp.dsc.um.lookup.datamodel.User. That class is not contained in any of SDK client jars. I don't even know which methods it has nor is it in any way connected with suggested com.adobe.idp.um.api.infomodel classes (User or Principal).

If I pass only common name or id as a parameter, I didn't immediately know how to get Principal object from this. Searching through API I found DirectoryManagerServiceClient which has exactly what I needed: findPrincipal(String oid)

Thanks!

Zeljko