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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Prevent promotion of non-latest versions

DarrenStorey
12-Amethyst

Prevent promotion of non-latest versions

Our users seem have the ability to create promotion notices with non-latest versions of objects in the promotable objects list. Brushing aside the reasons why anybody would be promoting non-latest (in our case this is user error), I'm wondering why this is possible and how to stop it. The promotion notice fires a workflow which aims to change state, but of course set state is only possible on the latest iteration. This conflict of interest creates a severe entry in the WfPropagationQueue resulting from the hung workflow process. Have we managed to break something here, or this a hole the OOTB config? Either way does anybody now how to put a lid on this? All I can think of is to put an expression in the WF that checks for non-latest version promotables. If this is the solution I have no ideas what that expression would be.


Darren

5 REPLIES 5

Hi Darren,
We faced the same issue. Attached is a quick example of how we check the iterations and notify the users of the rejected promotion.

[cid:image003.jpg@01CBE977.324E1870]

Hi Dax and Darren

One another approach is programmatically swap the latest iteration and
notify the creator for the changes made.

This will save considerable amount of time as the user need not create a new
promotion and add all the promotables again.

We deployed this to one of our clients and it works well.





Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect, Swasen Inc

swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);








There is a helper provided since 9.1 m050 that can refresh the iterations of items on the promotion request. I will send an example when I am back at my computer.

Sent from jeff's phone

Dax,



Perfect! Many thanks - I will test this out



Swamy, sounds like a good solution also but I would not know how to do this.

Jeff, interesting information, currently we are on M030 but plan to upgrade to M060 later this year


This is from Jeff originally. If you use the two lines of code beforehand…it will automatically gather the latest iteration. Thanks again Mr. Zemsky.



The following is what you need to add to your code. Add this before the actual promote step of the workflow or potentially during the review – see attached image for an example workflow concept

[cid:image001.png@01CBEA06.94400CC0]

Add the following code to the expression robot to call the update method :



com.ptc.windchill.enterprise.maturity.PromotionNoticeWorkflowHelper helper = new com.ptc.windchill.enterprise.maturity.PromotionNoticeWorkflowHelper((wt.maturity.PromotionNotice)primaryBusinessObject, false);

helper.updateWithLatestIterations();



Note : Replace 'false' with 'true' to test the scenario where you need to update only the promotion targets in the baseline and seeds. 'false' would imply update ALL - i.e update with latest iterations for promotion targets, baselineables in the baseline and the promotion seeds.


[cid:image002.gif@01CBEA06.94400CC0]

Steve Vinyard
Application Engineer
Announcements


Top Tags