does anybody know how to get the names of the people participating in a workflow process (e.g. promotion request) as a variable or attribute? For example, I would like to get the name of the approver so that it can be mapped to the cad-software parameters to have it automatically filled in the table on drawings and so on.
I am also facing this issue. Approver is out of the box modeled attribute which needs to be mapped to Proe Drawing format.
Can someone help?
I would also like to be able to do this. Have you guys figured out how? What versions of Windchill/CAD program are you running?
create a workflow global variable:
"approver" type of object: wt.org.WTPrincipalReference
set this code in the complete transition of the task where you want to get the approver (assume it is a task assigned to a single user)
WfAssignedActivity activity= (wt.workflow.work.WfAssignedActivity)self.getObject();
java.util.Enumeration allassig2 = activity.getAssignments();
Object a2= allassig2.nextElement();
java.util.Enumeration balots = ((wt.workflow.work.WfAssignment)a2).getBallots();
while (balots .hasMoreElements())
Object bal= balots .nextElement();
approver = ((WfBallot)bal).getVoter();
the approver can be then cast as a WTUser
where you will have methods to get the full name, name of the user , etc ....
Even after creating the variable "approver" type of object: wt.org.WTPrincipalReference, the check syntax shows error - cannot find variable "approver".