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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation x

Coding a flexible link between change objects

RFS
13-Aquamarine
13-Aquamarine

Coding a flexible link between change objects

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").

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire II
(To:RFS)

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

View solution in original post

2 REPLIES 2
HelesicPetr
22-Sapphire II
(To:RFS)

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

RFS
13-Aquamarine
13-Aquamarine
(To:HelesicPetr)

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

Announcements
Top Tags