Yes, I tried that API, but I still get the same warning. Element must be checked out in order to be checked in.
Maybe it's better to show you the hole code.
wt.epm.EPMContextHelper.setApplication(wt.epm.EPMApplicationType.toEPMApplicationType("EPM"));
wt.epm.EPMAuthoringAppType at = wt.epm.EPMAuthoringAppType.toEPMAuthoringAppType("PROE");
wt.epm.EPMDocumentType dt = wt.epm.EPMDocumentType.toEPMDocumentType("LAYOUT");
wt.query.QuerySpec qs = new wt.query.QuerySpec(wt.epm.workspaces.EPMWorkspace.class);
wt.epm.workspaces.EPMWorkspace workspace = null;
qs.appendWhere(new wt.query.SearchCondition(wt.epm.workspaces.EPMWorkspace.class,wt.epm.workspaces.EPMWorkspace.NAME,wt.query.SearchCondition.EQUAL,"the SPECIFIC WORKSPACE"),new int[] { 0 });
wt.fc.QueryResult qr = wt.fc.PersistenceHelper.manager.find((wt.pds.StatementSpec)qs);
System.out.println(qr.size());
while(qr.hasMoreElements())
{
workspace = (wt.epm.workspaces.EPMWorkspace)qr.nextElement();
}
epm=wt.epm.EPMDocument.newEPMDocument(number, name, app_type, doc_type, cad_name);
wt.inf.container.WTContainerRef container_ref = wt.inf.container.WTContainerRef.newWTContainerRef(workspace.getContainer());
wt.inf.container.WTContainerHelper.setContainer(epm, container_ref);
wt.folder.FolderHelper.assignLocation((wt.folder.FolderEntry) epm, workspace.getFolder());
wt.vc.wip.WorkInProgressHelper.service.checkin(epm, noteEpm)
wt.fc.PersistenceHelper.manager.save(epm);
Hopefully, you can tell me what is missing or wrong.
Thanks again,
Willi