Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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(); }