Hi, my requirement is to be able from a TBO to invoke the merge transformation (mergePDF_adts profile) on some documents contained in a folder and create a new document with the merge transformation result.
Following the CTS sdk's documentation and examples, my first approach has been to set the profile's parameter contentObjectIdX (contentObjectId1,contentObjectId2,...) before submitting the request. Unfortunately the server always considers only the first document (the SourceObjectId in the request) and ignores the others.
After I looked at the code in DA Administrator (TransformationContainer component) I realized that, to specify all different document to merge, multiple differents CTSRequest with the same related object id are sent, like the following:
ICTSRequest[] requests = new ICTSRequest[10];
for (int i = 0; i < this.requests.length;i )
{
request[i].setRelatedObjectId(strRelatedObjectId);
ctsService.submitRequest(getDfSession(), request[i],request[i].isNotifyUser(), false, deleteRequestOnCompletion);
}
Besides the fact that 'submitRequest' is deprecated, the strange thing is that in my case all these requests are processed separately in th CTS server and, at the end, the content of my output document (the related document) is simply the first document that I sent to CTS Server, with other documents as renditions instead of a single big document with all documents merged.
Anyone can give me any hints on how to solve this problem? What is the right way to submit multiple documents to a transformation profile, like mergePDF_adts ?
Attache is my code