How to upload files to DMS using SAP Build Apps and use them in SAP Build Process Automation:Part3

Estimated read time 6 min read

*This article is a continuation of Part 2. Here is part 1.

4.Creating the logic for the Execute Workflow button

Now that we have completed the logic to create a folder and upload files to DMS, we will create the logic to start the SAP Build Process Automation process from this SAP Build Apps application. It will start with the uploaded file (folder) information attached, so you will be able to reference this file on SAP Build Process Automation.

In SAP Build Apps, you can use the process created in Part 1 with SAP Build Library from Integrations.

If you can’t see the deployed process in the list here, you’ve probably forgotten to Publish.

Create the logic for the Execute Workflow button. The logic is simple.

The important thing is the “Trigger Process”. Select the process you made available from Integrations.

Select Object with Properties as Input Parameters and use Formula to set the values.

As explained in Part 1, the folder ID information must be passed in the format “spa-res:cmis:folderid:<folder ID on DMS>”. The folder ID should have been assigned to Application Variables from the API return value when creating the folder. Concatenate the string “spa-res:cmis:folderid:” to that value.

The logic is now complete. Let’s test it.

 

Test

Run the Build Apps application you created.

Clicking the File Upload button will open a file selection dialog, so this time we will upload a PDF document. I created a simple PDF document in Word for testing purposes.

The display depends on the settings in the dialog set after the file upload API, but it looks like the upload was successful. In debugging mode, it is better to check whether the folder is created and uploaded properly using ReuseUI or DMS API.
Next, click the Execute Workflow button to start the SAP Build Process Automation process.
This process (created in Part 1) is a structure that sends a form with a file attached to itself after being triggered by the API. Open My Inbox from SAP Build Lobby.

You should have received the form yourself. There seems to be an attached file as well. Let’s check the contents.

You can confirm that it is a PDF file that you uploaded from SAP Build Apps.

In this way, you can upload files with SAP Build Apps and link them to the SAP Build Process Automation workflow. SAP Build Apps allows you to perform more application-like processing than SAP Build Process Automation. It is also possible to do things that are impossible with SAP Build Process Automation forms, such as narrowing down searches such as major classification -> medium classification -> minor classification -> product, and interactive collaboration with external systems. The recommended usage is to use SAP Build Apps on the application screen that triggers the workflow.

nother important point is that you can link files uploaded to DMS from other apps by passing the format “spa-res:cmis:folderid:” + folder ID when triggering a process. (Although it needs to be the same DMS repository used by SAP Build Process Automation)

From what we hear from customers about how they use it, it seems like a common pattern is to attach files to workflows. I think you can do a lot more with it, so please give it a try.

Regards,

 

​ *This article is a continuation of Part 2. Here is part 1.4.Creating the logic for the Execute Workflow buttonNow that we have completed the logic to create a folder and upload files to DMS, we will create the logic to start the SAP Build Process Automation process from this SAP Build Apps application. It will start with the uploaded file (folder) information attached, so you will be able to reference this file on SAP Build Process Automation.In SAP Build Apps, you can use the process created in Part 1 with SAP Build Library from Integrations.If you can’t see the deployed process in the list here, you’ve probably forgotten to Publish.Create the logic for the Execute Workflow button. The logic is simple.The important thing is the “Trigger Process”. Select the process you made available from Integrations.Select Object with Properties as Input Parameters and use Formula to set the values.As explained in Part 1, the folder ID information must be passed in the format “spa-res:cmis:folderid:<folder ID on DMS>”. The folder ID should have been assigned to Application Variables from the API return value when creating the folder. Concatenate the string “spa-res:cmis:folderid:” to that value.The logic is now complete. Let’s test it. TestRun the Build Apps application you created.Clicking the File Upload button will open a file selection dialog, so this time we will upload a PDF document. I created a simple PDF document in Word for testing purposes.The display depends on the settings in the dialog set after the file upload API, but it looks like the upload was successful. In debugging mode, it is better to check whether the folder is created and uploaded properly using ReuseUI or DMS API.Next, click the Execute Workflow button to start the SAP Build Process Automation process.This process (created in Part 1) is a structure that sends a form with a file attached to itself after being triggered by the API. Open My Inbox from SAP Build Lobby.You should have received the form yourself. There seems to be an attached file as well. Let’s check the contents.You can confirm that it is a PDF file that you uploaded from SAP Build Apps.In this way, you can upload files with SAP Build Apps and link them to the SAP Build Process Automation workflow. SAP Build Apps allows you to perform more application-like processing than SAP Build Process Automation. It is also possible to do things that are impossible with SAP Build Process Automation forms, such as narrowing down searches such as major classification -> medium classification -> minor classification -> product, and interactive collaboration with external systems. The recommended usage is to use SAP Build Apps on the application screen that triggers the workflow.nother important point is that you can link files uploaded to DMS from other apps by passing the format “spa-res:cmis:folderid:” + folder ID when triggering a process. (Although it needs to be the same DMS repository used by SAP Build Process Automation)From what we hear from customers about how they use it, it seems like a common pattern is to attach files to workflows. I think you can do a lot more with it, so please give it a try.Regards,   Read More Technology Blogs by SAP articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author