Use uploaded documents in Process Automation API Trigger
We are shifting Workflows from an old environment to SAP Build Process Automation.
Our main ERP System is SAP S/4 HANA On Premise Release 2020 FPS02.
For one of the Processes, we need to trigger Workflows from SAP Backend. It is crucial to use documents in the Workflow, as it is one part to make the approver understand what he/she has to approve. And it is not a user friendly solution to trigger a Workflow and make a first task available again for exactly the same user to upload the files as a first task. That is simply not acceptable.
Until now i couldn’t find any solution to upload documents and use them already in the first Task of the Process. Beeing desperate helped and i was playing around with the API-Trigger.
We have Process Automation and DMS, Integration Option in place. Both instances are reachable from SAP Backend.
What is necessary to make uploaded files available in the first Approval Task?
Here are the steps to reproduce if you use the Process part of Process Automation.
Create a project for your process is something i do not handle here.
Create new Data Type
Create new Data Type and add one field.
I named it ‘file’ and its of data type ‘Document Folder’.
Configure Process Inputs
In the Process Inputs add one property ‘uploadFile’ and use the created data type. As it is already month ago now, I don’t remember if it only will work if you name it ‘uploadFile’. Because if you check out context Payload when you upload documents in a task, then this property is called ‘uploadFile’.
Trigger API with CMIS folder ID
You now see it available in API-Trigger.
I trigger the API now with this data. For the ‘file’ property I have to use the cmis path to the folder I used to upload files prior to the api trigger. I send this information with prefix ‘spa-res:cmis:folderid:’ and add the id of the folder.
So of course you need to have CMIS configured in Subaccount/Tenant to have it available like this.
Receive Task Email
In this process user receives an email and is able to navigate to inbox via link.
Have documents available in first Approval Task
Here in the first available task in process you see already a document attached. Additionally, the user can still add more documents if configured and useful.
I hope this blog helps some SBPA Users facing the same situation as we did 🙂
And of course let me know if things here needs to be explained more detailed.