+ doc.value().getReference() + "]" + " ["
+ doc.value().getRid() + "]");
}
- // // Add a version relations
- // Publication pub31 = version(pub3);
+ // Add a version relations
+ Publication pub31 = version(pub3);
+ ht.flush();
//
// LOG.debug("pub31 version doc: " + pub31.value().getTitle() + " ["
// + pub31.value().getReference() + "]" + " ["
ht.flush();
// Create a scenario document version
- // Publication spub31 = version(spub3);
+ Publication spub31 = version(spub3);
// LOG.debug("spub31 version doc: " + spub31.value().getTitle() + " ["
// + spub31.value().getReference() + "]" + " ["
// + spub31.value().getRid() + "]");
+ ht.flush();
// Add uses relations
pub2.addDependency(pub1);
ht.saveOrUpdate(spub2.value());
spub3.addDependency(spub2);
ht.saveOrUpdate(spub3.value());
- // spub31.addDependency(spub31);
- // ht.saveOrUpdate(spub31.value());
+ spub31.addDependency(pub31);
+ ht.saveOrUpdate(spub31.value());
ht.flush();
// Create target study1
throws BusinessException, IOException {
Document.Properties dprop = new Document.Properties();
dprop.setDocument(pub.value(), pub.getStep().getStep());
+ dprop.setLocalPath(pub.value().getTitle() + "_v1");
Publication newpub = _stepService.versionDocument(pub.getStep(), pub,
dprop);
pub.getOwner().getDocums().remove(pub);
pub.getStep().getDocuments().remove(pub);
pub.getOwner().add(newpub);
pub.getStep().getDocuments().add(newpub);
+ String filepath = newpub.getSourceFile().asFile().getAbsolutePath();
+ createFile(filepath);
return newpub;
}