Posted: 16 Jan 2017 5:11 EST Last activity: 3 Feb 2017 7:36 EST
How to download attachment from browser outside Pega Application
This is my first post on here, so thanks in advance.
I have create a web service to send some XML data relating to our work cases. The next step for me is to allow any attachments to be downloaded, I can use the Activity "DisplayAttachFile" and provide the LinkedRefTo parameter.
My question is what type of service should I be using to provide this functionality? Or shoud I be using some other object type?
Please do not suggest a "Mash-Up" as we are not going down that route.
Yes, I have already created a simple REST service to expose some Work metadata in XML format to the outside world. Next step is to allow the outside world to view any attachments linked to the Case. One element in the XML is the 'LinkedRefTo' data that can be used in the Activity 'DisplayAttachFile' but I'm not sure how to get this working in a service.
Posted: 4 years ago
Posted: 20 Jan 2017 14:42 EST
Vipin Kumar (DHEER_GCS)
Director, Software Solutions Engineering
1. Send the ‘attachment link’ url as part of the REST response; On clicking ‘attachment link’, actual attachment is retrieved by executing an activity(this activity is outside of REST service & end user is an operator in pega application). It will be easier to handle the download within a custom servlet using PRCustom style authentication for both users in prpc and not.
2. Send the ‘attachment link’ url as part of the REST response; On clicking ‘attachment link’, invoke another REST service to get the attachments. application that calls the pega REST service displays the attachments.(end users are non-pega).
The ‘application link’ will need to be constructed and will look something like: http(s)://<host>:<port>/<context root>/<servlet name>/<access group hash>?pyActivity=Work-.DisplayAttachFile&LinkedRefTo=<value>