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.
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>