Quantcast
Channel: PTC Community : Unanswered Discussions - Windchill
Viewing all articles
Browse latest Browse all 3592

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

$
0
0

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


Viewing all articles
Browse latest Browse all 3592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>