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

Promotion request how to Retrieve the approver name

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

Re: Promotion request how to Retrieve the approver name

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!

Highlighted

Re: Promotion request how to Retrieve the approver name

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?

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group