I am trying to save an instance of a Data-WorkAttach-File into a CMIS repository.
The requirement obliges me to use a CMIS session object so I can manipulate the authorization class.
To use the CMIS session, I have a java activity that gets the attachment from the Pega database and should use the attachment.pyAttachStream as input to generate a java.io.ByteArrayInputStream and then use the ByteArrayInputStream in generating the org.apache.chemistry.opencmis.commons.data.ContentStream.
Can you please indicate how to cast the encode string (Data-WorkAttach-File.pyAttachStream into and java byte array? Or how to generate a CMIS content stream from the clipboard property pyAttachStream?
My environment is Pega 7.2.2 interfacing with an Alfresco CMIS installation.
I see a reference in a java step to ByteArrayInputStream in activity MSOGenerateExcelFile which you can access from the developer portal with this search string: old:MSOGenerateExcelFile . You can take a look at that java step to see if that example gives you ideas about how to implement your particular need.
Posted: 5 years ago
Posted: 1 Aug 2017 23:34 EDT
Sudhakar Reddy Yaparla (SudhakarReddy)
Principal Technical Solutions Engineer