Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.
hi
Hi,
How to do that using API?
To do this grammatically (using API), you can use below code snippet:
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());
I hope this will help you.
Regards,
Shirish