cancel
Showing results for 
Search instead for 
Did you mean: 

Performing actions from Work Zone notifications and handling it in CAP application

Ashish70
Newcomer
0 Kudos
104

Hi Team,

I have followed the Developing Cloud Foundry Applications With Notifications tutorial and successfully created an application with notifications working as expected.

Now, I am trying to enhance it by adding actions to the notifications. I am currently facing an issue in the following scenario:

Use Case: Leave Request Action

  • I have a Leave Request entity.
  • When a leave request is created, a notification is sent to the approver.
  • The notification includes an action button – for example: "Reject Leave".
  • When the user clicks the Reject action, the backend CAP Java application receives a call to the /ExecuteAction API.

 

Problem:

In the /ExecuteAction call, I want to receive the Leave Request ID (or some unique record identifier) so that I can find and reject the correct record in the backend.

I tried adding a placeholder like {leaveRequestId} in the ActionId or TargetParameters, but this did not work.

What I Need Help With:

  • How can I pass the leave's record ID or other dynamic parameters to the backend via the /ExecuteAction payload?
  • Is there a supported way to include contextual data in the action definition or payload so that the backend knows which record to act on?

Accepted Solutions (0)

Answers (0)