Skip to main content
10-Marble
September 19, 2017
Solved

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

  • September 19, 2017
  • 2 replies
  • 3662 views

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?

2 replies

22-Sapphire I
September 19, 2017

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.

kschwartz10-MarbleAuthor
10-Marble
September 19, 2017

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

 

kschwartz10-MarbleAuthor
10-Marble
September 25, 2017

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

kschwartz10-MarbleAuthorAnswer
10-Marble
September 26, 2017