Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Using WC 12.0.2.7, I am trying to auto-create and link change objects at various levels (PR to CR, CR to CN, etc.). I have searched the community for examples and found one called "Create Change Request from Problem Report and Default to same Container" that seemed to have some useful code, but the linking between the CR and CN in the example used the older model of linking.
wt.change2.FormalizedBy fb = new wt.change2.FormalizedBy();
fb.setChangeIssue(ci);
fb.setChangeRequest2(CRNew2);
wt.fc.PersistenceServerHelper.manager.insert(fb);
I cannot find examples of the newer objects used for linking (ChangeProcessLink?). Does anyone have an example?
Related question: Does anyone have the most recent JavaDocs available from PTC (or can anyone tell me where to get them)? My copy appears to have many gaps (such as the "insert" above call which does not appear in my docs on the "PersistenceManagerSvr" interface used in "PersistenceServerHelper.manager").
Solved! Go to Solution.
Hi @RFS
New Flexible Change Associations has been introduced in the Windchill 11+
Check Article CS63595 to understand the objects and links
New API service has been introduced to work with Flexible Changes.
wt.change2.flexible.FlexibleChangeHelper.getService()
The javaDoc is located in Windchill installation
<WindchillServerAdress>/Windchill/app/#ptc1/apiDocs/apiDocs?oid=OR%3Awt.org.WTUser%3A207&u8=1
or you can download it from PTC Knowladge Base
PetrH
Hi @RFS
New Flexible Change Associations has been introduced in the Windchill 11+
Check Article CS63595 to understand the objects and links
New API service has been introduced to work with Flexible Changes.
wt.change2.flexible.FlexibleChangeHelper.getService()
The javaDoc is located in Windchill installation
<WindchillServerAdress>/Windchill/app/#ptc1/apiDocs/apiDocs?oid=OR%3Awt.org.WTUser%3A207&u8=1
or you can download it from PTC Knowladge Base
PetrH
For those interested, the new link type code that worked for me is:
wt.change2.ChangeProcessLink cpl = wt.change2.ChangeProcessLink.newChangeProcessLink(ci, cr);
wt.fc.PersistenceServerHelper.manager.insert(cpl);
Thanks for the help