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

We are happy to announce the new Windchill Customization board! Learn more.

Promotion request how to Retrieve the approver name

SteveMartel
1-Newbie

Promotion request how to Retrieve the approver name

Good day to all,

Does anyone knows a way to retreived the name of the approver once the promotion request is completed then sent this name to an attribute then show this name on the Proe drawing???

Basically I need to show on the drawing who has approved to have this name on the PDF generated by the publisher!

2 REPLIES 2

OK I found a portion of solution,

First create a new attribute attach to EPMdoc (In my case APPROVE_BY. )

Save as the promotion approval request out of the box.

Then in the workflow add new variables with type java.lang.string.

Then in the activity add this variable and in the transition tab select the approve transition and add the following java code

"try {
wt.org.WTPrincipal currentUser = wt.session.SessionHelper.manager.getPrincipal();

APPROVE_BY = currentUser.getName();

}"

Now I need to update the attribute. any ideas!

psernetz
4-Participant
(To:SteveMartel)

Have you found a solution for your problem? I´ve actually followed your advice with the getPrincipal() function. But this returns Administrator all the time. May be because the Workflow is processed through the administrator. The requestor and approver are normal users and non administration users.

And what about passing the attributes back to Pro/E?

Any suggestion?

Top Tags