I am trying to download a file from a repository using repository APIs/D_pxGetFile DP. In traditional UI, the file content is retrieved using D_pxGetFile datapage and a java step in an activity is used to “sendFile” to browser on click of a link/button.
What is an equivalent approach in Constellation UI?
@Gowtham Allu if the file is an attachment to a case, you can use the dx api Pegasystems Documentation - if this is a file that you get through custom activity - you will need to create your own API - In any case, you will need to create a Constellation DX Component.
To reduce the amount of customization, the best practice should be to link the file as an attachment property and use external storage Pegasystems Documentation
@RichardMarsot These are not case attachments. They are notice/letter PDFs sent to a customer to be displayed as a table in a Customer Service Composite screen in Interaction case.
@Gowtham Allu in Constellation UI - there is no activity but you would implement this by calling the DX data_View API that will return a json payload where one of the attribute is the binary content - you can send use a browser API to download the file on the client using a hidden link - there are lots of article on the web on how to download a file using javascript
Hi @RichardMarsot, can the DX data_View API access the binary files (RULE-FILE-BINARY) stored in our pega environment?
Wondering in case we create a custom DX component of type Field (and subtype URL/Icon Button URL) we can filter in authoring time the rules of class RULE-FILE-BINARY were we previously created the binary rule.
@josenavas yes a data view api calls a DP - your DP can use an activity to open an rules including binary files -
The field DX component will let you select a property in the rule-file-binary - not a rule instance - this is not a smart prompt for selecting a rule - You just need to wrap the rule opening with a DP and an activity.