Hello All,
UseCase:
We have two applications built on Constellation in Pega 25.1.3 cloud.
- First application uses front end as a react and uses Pega workflow via DX APIs as headless.
- Second application uses front end as a Salesforce, and uses Pega workflow via Salesforce Process Extender for Pega marketplace component.
Both applications have a common requirement to upload files to the case as part of the process. Part of it, we have below common use cases:
- Manual upload of attachments to the case by user from both React front end UI or from Salesforce front end UI.
- Auto attachment of files from Docusign to the case after the Signers have finished signing the document.
- Auto generation of PDF file in Pega with fields captured in the case e.g. OWA form.
- Uploading the file from the listener / job scheduler.
- Letting the user who logs into the Pega constellation UI directly and upload a document in a case.
Pre-Requisite:
Our organization has a document management system where all applications must upload the user uploaded documents to this system, and this can be done via Multi-Part REST API only.
OOTB Behavior:
OOTB, Pega lets the document to be uploaded into Pegacloudstorage repository under attachments folder using the DX API methods from Constellation UI using this Multi-Part REST Service - application/v2 (Upload - to upload the file and record the transaction in the Data-Workattach and Link-Attach tables and then followed by Attachment method call to retrieve and show this in UI as links for user to see the uploaded attachments).
Open Questions:
- How can we overwrite Pega OOTB Upload Multi-Part REST Service call in Constellation and call org’s specific custom Multi-Part REST API?
- How can i make sure Pega doesn’t store this document interim in PegaCloudStorage repository?
- What design option i have, that satisfies all the above use cases mentioned ?
- The design should satisfy
- if a different front end like React application can call via DX API.
- Or if user uploads via Pega Constellation UI,
- A use case where file may auto attach to a case
- In all scenarios, instead of Pega storing in its PegaCloudStorage attachment folder, this file should be sent to the custom organization Multi-Part REST API should gets called, along with meta data of the case,
- And the respective doc id returned from the organization system should gets stored in the data-workattach table.
Note: I cannot use or create a custom repository, as here i am not invoking a custom repository, i am invoking my org’s custom Multi-Part REST API where ever a file gets attached to a case.
Please kindly assist with possible design option. Appreciate it.