Skip to main content
1-Visitor
July 3, 2015
Solved

Strange groups in WTGroup Table.

  • July 3, 2015
  • 2 replies
  • 2031 views

Experts, I was working on a code for fetching WTGroups and I saw some strange values being returned by the code. On checking the DB I saw weird group names in the database as well. These groups are not present in the UI. Any idea what these are? I also wrote a query builder report to query all WTGroups. It also returns the same.ScreenShot035.jpgScreenShot036.jpg

Best answer by ChrisSpartz

These are deleted groups. When a group is deleted from Windchill, most of the DB entries related to the group are deleted. However, Windchill keeps the entry in the WTGroup table, but makes two modifications to it. First, the name of the group is updated to be '{wt.org.WTGroup:<idA2A2>}<Name>'. Then, the value of the 'disabled' column is set to 1. The same is also done when users and orgs are deleted.

Whenever Windchill does any query for users/groups/orgs, the query always includes the predicate 'disabled=0', so that only valid groups are returned. If you want your code to ignore these groups, then you should modify it to only query for groups with a value of 0 in the disabled column.

2 replies

12-Amethyst
July 6, 2015

These are the groups created either for at site or at Org or container level, which are not visible to users But required as part of the System. you can ignore them.

psampath1-VisitorAuthor
1-Visitor
July 6, 2015

Hi Sudhakar,

                   Thanks for your prompt reply. I am developing a utility to replace one user with the another in All WTGroups when he leaves the Organization. If what you say is true then I Will have to replace the user in those groups as well. As, when I query all groups for that user these groups are returned as well and I assume I Will have to replace the user in those groups as well. Correct me if I am wrong.

Thanks.

Praveen

12-Amethyst
July 6, 2015

Hi Praveen,

         I don't think there will be users in those groups. I had developed a utility like that in past. we need to replace the user other than those groups. If you have Project link you need to replace in project template also.

Regards

Sudhakar

13-Aquamarine
July 7, 2015

These are deleted groups. When a group is deleted from Windchill, most of the DB entries related to the group are deleted. However, Windchill keeps the entry in the WTGroup table, but makes two modifications to it. First, the name of the group is updated to be '{wt.org.WTGroup:<idA2A2>}<Name>'. Then, the value of the 'disabled' column is set to 1. The same is also done when users and orgs are deleted.

Whenever Windchill does any query for users/groups/orgs, the query always includes the predicate 'disabled=0', so that only valid groups are returned. If you want your code to ignore these groups, then you should modify it to only query for groups with a value of 0 in the disabled column.

16-Pearl
July 9, 2015

To avoid disabled groups in your results , you can append following search condition to QuerySpec in your customization:

qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.DISABLED,SearchCondition.IS_FALSE )