Community Tip - You can change your system assigned username to something more personal in your community settings. X
We need to create change notice and pre-defined change tasks (about 10) under it programmatically. Windchill version is 9.1 M40. Can anyone share code related to this?
Solved! Go to Solution.
public void newChangeOrder() throws WTException, WTPropertyVetoException{
WTChangeOrder2 changeOrder = WTChangeOrder2.newWTChangeOrder2("Test Change Notice ");
changeOrder.setChangeNoticeComplexity(ChangeNoticeComplexity.SIMPLE);
changeOrder = (WTChangeOrder2)ChangeHelper2.service.saveChangeOrder(changeOrder);
WTChangeActivity2 changeActivity1 = WTChangeActivity2.newWTChangeActivity2("Test Change Activity 01");
changeActivity1.setDescription("Test Change Activity 01 Description!!!");
changeActivity1 = (WTChangeActivity2)ChangeHelper2.service.saveChangeActivity(changeOrder, changeActivity1);
WTChangeActivity2 changeActivity2 = WTChangeActivity2.newWTChangeActivity2("Test Change Activity 02");
changeActivity2.setDescription("Test Change Activity 02 Description!!!");
changeActivity2 = (WTChangeActivity2)ChangeHelper2.service.saveChangeActivity(changeOrder, changeActivity2);
WTChangeActivity2 changeActivity3 = WTChangeActivity2.newWTChangeActivity2("Test Change Activity 03");
changeActivity3.setDescription("Test Change Activity 03 Description!!!");
changeActivity3 = (WTChangeActivity2)ChangeHelper2.service.saveChangeActivity(changeOrder, changeActivity3);
}
public void newChangeOrder() throws WTException, WTPropertyVetoException{
WTChangeOrder2 changeOrder = WTChangeOrder2.newWTChangeOrder2("Test Change Notice ");
changeOrder.setChangeNoticeComplexity(ChangeNoticeComplexity.SIMPLE);
changeOrder = (WTChangeOrder2)ChangeHelper2.service.saveChangeOrder(changeOrder);
WTChangeActivity2 changeActivity1 = WTChangeActivity2.newWTChangeActivity2("Test Change Activity 01");
changeActivity1.setDescription("Test Change Activity 01 Description!!!");
changeActivity1 = (WTChangeActivity2)ChangeHelper2.service.saveChangeActivity(changeOrder, changeActivity1);
WTChangeActivity2 changeActivity2 = WTChangeActivity2.newWTChangeActivity2("Test Change Activity 02");
changeActivity2.setDescription("Test Change Activity 02 Description!!!");
changeActivity2 = (WTChangeActivity2)ChangeHelper2.service.saveChangeActivity(changeOrder, changeActivity2);
WTChangeActivity2 changeActivity3 = WTChangeActivity2.newWTChangeActivity2("Test Change Activity 03");
changeActivity3.setDescription("Test Change Activity 03 Description!!!");
changeActivity3 = (WTChangeActivity2)ChangeHelper2.service.saveChangeActivity(changeOrder, changeActivity3);
}