Skip to main content
13-Aquamarine
September 4, 2025
Solved

Auto Revise in Promotion request

  • September 4, 2025
  • 1 reply
  • 911 views

Version: Windchill 12.1

 

Use Case: We have 2 versioning schemes, numeric for NPD and alpha for production. With promotions items can be auto revised when promoting to the production gate, which in turn moves them to production released. A requirement I have is to only enable the revise action within a change context. A promotion is not considered inside of the change context so the auto revise is not working if I have the "Revise in Change Process" preference enabled.


Description:

How can I auto revise the objects moving from the development state to production state (and ultimately the production released) within the change context? I cannot find anything in the API to revise in a change notice/activity similar to how a promotion can revise objects.


I considered creating a promotion inside the cn workflow but I am unsure if that will work. I also considered trying to turn off the preference in the promotion workflow then turning it back on though not ideal. Is there a way around this issue besides revising objects manually or using a script after the fact?

 

I should add I only care about restricting revisions in production released state to the change management process but the preference is broad. Objects in the npd states can go either way with the restriction if that matters at all

Best answer by HelesicPetr

Hi @ZC_10909252 

You have to write own code to do so.

Here is an example how to revise.

var0 = (WTPart)VersionControlHelper.service.newVersion(Versioned object, true);
var0 = (WTPart)PersistenceHelper.manager.store(Persistable var0);

A main point is to collect resulting objects and then create new version. 

QueryResult changeablesAfter = ChangeHelper2.service.getChangeablesAfter(sourceChangeActivity);

PS> in the workflow you have to use full package definition so WTPart = wt.part.WTPart, VersionControlHelper =wt.wc.VersionControlHelper wt.change2.ChangeHelper2 etc.

PetrH

1 reply

avillanueva
23-Emerald I
23-Emerald I
September 5, 2025

Can you explain "Change context"? Did you create a separate product area only for changes? Where do the objects under change actually reside?

13-Aquamarine
September 5, 2025

Sorry should've said change process like in a cn

avillanueva
23-Emerald I
23-Emerald I
September 5, 2025

the change notices is going to manage things against a change task. Now, you are looking to release things and have them auto-revise so this will all be custom robots in that workflow. I would assume that you put your items in the affected data section, do some validation and review steps and once its good to do, change their states and revise (adding them to the resulting items section of the change task. A bit of a non-standard approach but you will have to code the logic to do the revise I believe.