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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How can I get the email of the user who completed the task?

ptc-4896214
1-Newbie

How can I get the email of the user who completed the task?

With this code I can get the user that completed, but need his email.

try {

java.util.Enumeration assignments = ((wt.workflow.work.WfAssignedActivity)self.getObject()).getAssignments();

while (assignments != null && assignments.hasMoreElements()) {

wt.workflow.work.WfAssignment assignment = (wt.workflow.work.WfAssignment)assignments.nextElement();

if (assignment.getStatus() == wt.workflow.work.WfAssignmentState.COMPLETED) {

java.util.Enumeration w_items = wt.fc.PersistenceHelper.manager.navigate(assignment, wt.workflow.work.WorkItemLink.WORK_ITEM_ROLE, wt.workflow.work.WorkItemLink.class, true);

wt.workflow.work.WorkItem w_item = null;

while (w_items.hasMoreElements()) {

w_item = (wt.workflow.work.WorkItem) w_items.nextElement();

userTask = w_item.getCompletedBy();

}

}

}

} catch (wt.util.WTException ee) { ee.printStackTrace(); }

0 REPLIES 0
Top Tags