Skip to main content
10-Marble
Sep 19, 2017 8:25 PM UTC
Solved

Approve Promotion Request task - how to get the Requested Promotion State

In the actual Approve Promotion Request task, the Requested Promotion State is not included in the attributes on the task page, but it does show up on the email notification.  I put in a ticket but they said there is no way out of the box to add that attribute to the task.  Bizzare.  So I already put in a request to Product Ideas to get that functionality.  In the mean time, can someone with java expression knowledge help me include this in the instructions of the task?  I am not really clear on what I need to do for that.  I did see someone posted something similar, but I'm not sure how I get this work. 

 

PromotionNotice pn=POB;

String matuarityState=pn.getMaturityState().getDisplay()toString();

 

I add an expression robot on the workflow Approve Promotion Request task.  On the Expression page, what do I write?  Can someone help me out?

4 replies

22-Sapphire I
Sep 19, 2017 8:54 PM UTC

Just FYI "PBO" (instead of "POB") is the standard way to refer to the "primary buisiness object" which in this case is the promotion request, on which the workflow process is running.  There are other uses of PBO but this is one of the key uses.

Translate
kschwartz10-MarbleAuthor
10-Marble
Sep 19, 2017 8:58 PM UTC

Thanks.  I wondered what that meant. I just reposted what someone else wrote here.

https://community.ptc.com/t5/Windchill-Questions/How-to-get-Requested-Promotion-State-and-Process-Initiator-in/m-p/392904

 

Translate
kschwartz10-MarbleAuthor
10-Marble
Sep 25, 2017 8:19 PM UTC

I still don't understand how to add this expression.  Can anyone help tell me exactly what I need to do?  Thanks.

Translate
kschwartz10-MarbleAuthorAnswer
10-Marble
Sep 26, 2017 7:28 PM UTC