Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hello All,
Is there any API which can help to update existing WTUser with another WTUser.
For Example, If john is one user who is part of many groups and change processes and he leaved the company now I want john should be replace with Max. All the existing task which was with john should be assigned to Max.
Thanks
ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.workflow.work.WorkItem:319469");
WorkItem wi = (WorkItem) PersistenceHelper.manager.refresh(oid);
System.out.println("WorkItem Name: " + wi.getIdentity());
System.out.println(" Workitem Owner (Before delegate): " + wi.getOwnership().getOwner().getIdentity());
WTUser user = wt.org.OrganizationServicesHelper.manager.getAuthenticatedUser("shirish");
WTPrincipal principal = (WTPrincipal) user;
wt.workflow.work.WorkflowHelper.service.delegate(wi, principal);
System.out.println(" Workitem Owner (After delegate): " + wi.getOwnership().getOwner().getIdentity());
Hello @Rocket_Max ,
I don't want to use it for seprate Workitems .
I just want old user should get it replace everywhere inside windchill.(e.g Inside teams, roles and all change items)
Thanks
I don't see any similar records in the knowledge base...
Do you want to try "old user has been disconnected and reconnected to a new username" This seems to meet your requirements, but there are no similar records in the knowledge base either
If you are testing, why not give it a try
that's the safest way to do it , all taken care by Windchill participant management tool.
otherwise, WTUser is the key table , if you know what i mean and up to the risks 😉
I would recommend not customizing but using the tools and reports to help complete your job. Hopefully turnover for workflow recipients is infrequent. First off, immediately go in and delegate any future task but using the user's calendar. As admin, you can do setup an indefinite delegate. Next, create a query builder report that can display any context team roles that this user is a member of. There is a feature in the context team that will replace a user with another user and handle any open workflows. If there are not too many places, it should not take long. Next there is groups. There should be no replacement as I would suspect the other user is already a member but this is simply an remove/add operation.
I am living your life. I pulled all user membership and groups in a report to take a quick look. There were 600+ entries of users in Product roles/groups of users that are deleted. Far to many to clear manually unless I want to block a good portion of a day. I know I can take care of many in one shot on a context team page but its still tedious work. If I come up with something, I will share. For now, its burning that report to 0.
Hi @BA_10780502,
write a utility to get all the tasks assigned to user a and replace with user b if its a one time activity.
Or If its a repetitive activity implemented a wizard in UI to input the old user and new user details.
The best practice is to ask user the user to reassign all the tasks before leaving the organization.
Hi ,
Interesting question
you can manage the Team members base on Roles and Groups via then adding and removing delegation it better,
and base on workflow the task automatically assign to delegate or replaced users.
and im not sure for this API tools
Thank
Sarathkumar M