cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Capturing the approval form status on SAP BPA (Build Process Automation)

Isyraf_Afifi
Explorer
0 Likes
2,392

Hi experts,

I have a question about SAP Build Process Automation (BPA). If I create an approval form with options to approve or reject, can I capture the approval status and integrate it with SAP Build Apps?

Specifically, I want to display statuses such as 'Approved', 'Rejected', and 'Pending' in SAP Build Apps using the form. 'Approved' if the user clicks approve, 'Rejected' if the user clicks reject, and 'Pending' if the user hasn't clicked approve or reject yet.

I only acknowledged about taking the status of a whole process and what I want it the status inside the process which is the approval form.

My guess is that we can retrieve the status by create an action. If so, how the configuration will be? Or are there any existing functionalities within SAP BPA for capturing and retrieving approval form status, like using output of the form?

Best regards,
Isyraf

Accepted Solutions (1)

Accepted Solutions (1)

AkhilDas
Explorer
0 Likes

Hi @Isyraf_Afifi,

One workaround i did for such a scenario was to create a Decision for each approve and reject step.

In the decision, i will create a decision table whose output will be a hardcoded text 'Approved' or 'Rejected' based on the step in which the process flows.

Regards,

Akhil Das

 

Answers (3)

Answers (3)

Isyraf_Afifi
Explorer
0 Likes

Hi @AkhilDas 

Thanks for the suggestion. Can I see your steps regarding on the setup of the Decision? I've managed to get the attributes label only and not the value. As you can see in this image:

Isyraf_Afifi_1-1720081190073.png

 

AkhilDas
Explorer
0 Likes

Hi @Isyraf_Afifi
Here I created a Decision for Approval as well as Reject.

Each of these Decision contains a input property and output property. 

Screenshot 2024-07-05 at 11.54.15 AM.png

Create a Decision Table like below where output property status is the value you want to capture.
Screenshot 2024-07-05 at 11.56.30 AM.png

The above decision is the one i created for Approval status (branch). Similar one needs to be created for Reject status(branch).

As Input to the Decision please map a value which would satisfy the condition given in the Decision table.

Hope I am able to explain you.

Thank you.

 

 

Isyraf_Afifi
Explorer
0 Likes

Hi @Archana 

Can you explain more about: 

"If you also want to preserve the outcome of the task like Approved or Rejected then you have to get it added in the Process Context like you can have a explicit option Button say "Approve" or "Reject" and user has to explicitly select that besides selecting the button"

How can I add the Approved/Rejected to the process context, is it using decisions or action

Archana
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello @Isyraf_Afifi , 

If you want to check the status of the User Task outside the process, then you can use Task APIs - with which you can get the task status as READY, RESERVED, CANCELED, COMPLETED based on the respective task instance ID.

If you also want to preserve the outcome of the task like Approved or Rejected then you have to get it added in the Process Context like you can have a explicit option Button say "Approve" or "Reject" and user has to explicitly select that besides selecting the button OR if you have SAPUI5 based user task UI then on button click you can call the respective Task API to added the outcome in the process. These are the only two options available as-of-now. In future, the form button outcomes will be available as process context. 

Hope that helps,
Archana

Isyraf_Afifi
Explorer
0 Likes

Hi Archana,

I tried to use the "try out" function from SAP Business Accelerator Hub. After I add an environment, the header adds one more thing which is Authorization:

Isyraf_Afifi_0-1718250751619.png

Where can I get the value of it (bearer undefined) I tried to use "my-url/oauth/token" (The url is from service key) but got 401 

Thanks in advance,

Isyraf