I need a assistance on the above. Please can anyone provide the steps to acheive that. I just have info about those two pages only pyRequestAttachmentPage and pyResponseAttachmentPage for Data-ServiceMessage class.
It would be a great help if any one provide steps.
Thanks in advance
Posted: 1 year ago
Posted: 18 Oct 2019 14:02 EDT
Praneeth Purighalla (PraneethPurighalla)
Lead System Architect - Pega Consulting
For Pega hosted services (REST or SOAP), the incoming attachments' info is stored in pyRequestAttachmentPage. There are three value list properties under this page.
pyAttachValues - contains the attachment content in base64 encoded form
pyAttachNames - contains the attachment name
pyAttachTypes - contains the mime type of the attachment
If you are receiving multiple attachments in one request, you will have to iterate through each of these value list properties to extract each attachment related info and then create a new page of Data-WorkAttach-File class and copy content from pyAttachValues into pyAttachStream and value from pyAttachNames into pxAttachName, Obj-Save the page and use Link-Objects to create Link-Attachment entry linking the data-workattach-file entry to the work object. You do all this in the REST service activity.