Question

1
Replies
657
Views
Onur Turkmen (trkmo)
PEGA
Technical Solutions Engineer
Pegasystems Inc.
TR
trkmo Member since 2014 2 posts
PEGA
Posted: July 27, 2016
Last activity: July 27, 2016
Posted: 27 Jul 2016 3:01 EDT
Last activity: 27 Jul 2016 11:00 EDT
Closed

SR-A88245: CMIS Filenet - upload unfiled document

Using CMIS connected to a Filenet server, when uploading a document, even if we put "" in pyFolderId in pySaveFileContent, the CMISConnector.java still setup folder id based on root folder id instead of passing null value.


It implies only few lines of code in CMISConnector.java in Pega:


 if (("").equals(folderIdString))

 {

 //TODO: CMIS spec considers folder id mandatory only if repository does not have unfiling support but OpenCMIS considers folder id as a mandatory value for creating a document.


 //get the root folder id

 oLog.debug("Folder Id is absent, creating document in root folder");

 try

 {

 Folder root = mSession.getRootFolder();

 folderIdString = root.getId();

 }

 catch(Exception ex)

 {

 throw new RemoteApplicationException("Folder Id was not specified, failed to access Root folder: ", ex);

 }

 }

 return folderIdString;


becomes :


 if (("").equals(folderIdString))

 {

 //get the root folder id

 oLog.debug("Folder Id is absent, creating unfiled");

folderIdString = null;

 }

 return folderIdString;


We need to pass null value to be able to upload unfiled documents.

Using CMIS connected to a Filenet server, when uploading a document, even if we put "" in pyFolderId in pySaveFileContent, the CMISConnector.java still setup folder id based on root folder id instead of passing null value.

It implies only few lines of code in CMISConnector.java in Pega:

 if (("").equals(folderIdString))
 {
 //TODO: CMIS spec considers folder id mandatory only if repository does not have unfiling support but OpenCMIS considers folder id as a mandatory value for creating a document.

 //get the root folder id
 oLog.debug("Folder Id is absent, creating document in root folder");
 try
 {
 Folder root = mSession.getRootFolder();
 folderIdString = root.getId();
 }
 catch(Exception ex)
 {
 throw new RemoteApplicationException("Folder Id was not specified, failed to access Root folder: ", ex);
 }
 }
 return folderIdString;

becomes :

 if (("").equals(folderIdString))
 {
 //get the root folder id
 oLog.debug("Folder Id is absent, creating unfiled");
folderIdString = null;
 }
 return folderIdString;

We need to pass null value to be able to upload unfiled documents.

***Updated by moderator: Lochan. Removed user added Ask the Expert tag. Apologies for confusion, shouldn't have been an end-user option; updated Category***

Data Integration Support Case Exists
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.