Hello,
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.
Regards
Hi,
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?
Thanks!
Hello
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();
while (allassig2.hasMoreElements())
{
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
(wt.org.WTUser)approver.getPrincipal();
where you will have methods to get the full name, name of the user , etc ....
regards
Gregory
Hi Gregory,
Even after creating the variable "approver" type of object: wt.org.WTPrincipalReference, the check syntax shows error - cannot find variable "approver".
Any suggestions?
Regards
Ishaan Nayyar