We are using filenet to store our attachments. But user want to see some times that attachments as native documents. So we have queried the filenet system and got the binary content. But how to show this binary content to users as file.
***Updated by Moderator: Lochan. Removed user added helpme tag. Apologies for confusion, shouldn't have been an end-user option; added Category***
I have never tried this, but on research I have found few interesting things from other Pega developers.
In an activity, add a Java Step to write the binary stream content to a file. Once file becomes available, then you can invoke DownloadFile OOTB activity to download this file for user. You can configure these things on a button with a call to invoke an activity.
Hope it helps you.
FileName = new java.io.File(FullPath+pdfName);
fileOuputStream = new java.io.FileOutputStream(FileName);
Then you can call OOTB "DownloadFile" activity and pass the required parameters.