cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Extract all Groups, user and its profile related information by java code

Level 8

Extract all Groups, user and its profile related information by java code

Hi All,

i need to extarct all Groups, Group Member and user related information in tabular manner by using java code.

Please any one give me some idea how i can achive this requirement.

Thanks,

Vivek

Tags (3)
17 REPLIES 17

Re: Extract all Groups, user and its profile related information by java code

Every Windchill system admin needs this. This exact question has been posted to the world at least 1,000,000,000 times that I'm aware of. It's pretty incredible that at release 10.x PTC has not provided any way to extract this info. We paid a consultant to create a report. Others export from Windchill DS and parse in innovative ways in Excel.

The needed info is at Org, Groups (or possibly Site, Util, Participant admin). There is just no way to output the results currently.

Re: Extract all Groups, user and its profile related information by java code

Vivek, if you are familiar with customization, you can use the Windchill APIs (refer to Windchill javadoc) to write a java class that extracts this information in a required format. You can look for helper and service apis related to WTUser, WTPrincipal, WTGroup classes along with the QuerySpec.

Another option is to create a custom report using Query Build (Report Manager), but that is way too complex. You might want to consider it only as last resort.

Re: Extract all Groups, user and its profile related information by java code

Query Builder can't reach into LDAP.

Re: Extract all Groups, user and its profile related information by java code

True, Mike. But every LDAP user who once logs into Windchill would have an entry in the windchill database table, from where you can query the record, using either query builder or java code.

Re: Extract all Groups, user and its profile related information by java code

Agree on the wtuser and wtgroup tables - but the key thing is not being able to get group membership from the database via query builder.

Re: Extract all Groups, user and its profile related information by java code

Right. Thats where using the query builder becomes complicated!

Using java code - We can query all the groups using QuerySpec apis, and then for each group, we can use the WTGroup.members() method to get an enumeration of all the group members.

Re: Extract all Groups, user and its profile related information by java code

I'm very interested in getting a report still that lists users and what groups they are in. The report we paid for gets confused when groups are nested and we highly nest them. Do have this available and can you share to mike.lockwood@alcon.com?

I'll happily supply anything we have that you are interested in.

thanks

Re: Extract all Groups, user and its profile related information by java code

Unfortunately, I dont have this available, but here is what you can do:

1. Query all the groups from the database using QuerySpec apis (you can search for QuerySpec in Windchill javadocs).

2. For each group, get all the members using WTGroup's members() method.

3. What you would get in the enumeration would be a WTPrincipal reference, and a WTPrincipal could either be a WTUser or WTGroup. If the it is WTUser, you have got a user and if its WTGroup, you have got a nest group and can get the members for this group too.

WTGroup.GIF

members.GIF

WTUser.GIF

Re: Extract all Groups, user and its profile related information by java code

Mike I will send you Report..