Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
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