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

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

Highlighted
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(); }