I have not tested it (like I said I had it working properly with changeables) but something like this should work:
try
{
wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;
wt.fc.QueryResult qr = wt.maturity.MaturityHelper.service.getBaselineItems(pn);
while (qr.hasMoreElements()) {
wt.vc.Versioned obj = (wt.vc.Versioned) qr.nextElement();
wt.vc.Versioned newObject = wt.vc.VersionControlHelper.service.newVersion(obj);
wt.fc.PersistenceHelper.manager.store(newObject);
}
}
catch (wt.util.WTException ex)
{
}
Toby