Hello experts,
we have a Fiori Elements App with managed RAP and OData V4 and Draft (2021SPS01).
We would like to execute a function module (with 'COMMIT WORKS' in it) after every save in the Fiori App (Create/Update).
As far as I know, the following options are still before the commit or the data is persisted in the table.
So the function module can't access it yet.
We tried this so far:
"with additional save"
"determination method on save { create; update;}"
In both implementations, when we try so SELECT from the database, the newly created data is not yet commited.
Are there other alternatives in the RAP Framework?
In the Fiori Framework there is the event "attachAfterActivate", but apparently only in the V2 Framework?
What I have not tried yet, but what is also not ideal,attach to an event directly on the V4 model like createCompleted.
What options do we have here?
Request clarification before answering.
Has anyone found a fundamental solution for this problem so far?
I often encounter the "Destination 'NONE'" method, but this causes a lot of unexpected behavior in my case.
We want to trigger a workflow after the RAP framework has updated/created it's entity.
I'm encountering issues where the workflow tries to manipulate the data before the RAP framework was finished committing / wrapping up.
My solution so far, is this:
But even this approach can cause issues:
when you place a breakpoint in the action handler, the workflow will run inside it's own LUW and perform updates before RAP finished it's own internal commit.
The transition to RAP feels like a step back for my specific scenario compared to SEGW.
I need the guarantee that our logic is ran sequentially, but it isn't clear how to achieve it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christophe
Your Problem (Start WF after all Tables are saved and commited by RAP) might be solved with RAP Business Events which are introduced in Release 2023.
I can't test it out right now. Maybe you have already?
Sounds promising 🙂
"As event provider, an event can be defined in the behavior definition of a RAP business object with the key word event EventName with or without parameters. After the event has been defined, it can be raised in the behavior implementation in the late save phase. Usually, an event with the respective message is raised after a change of state has been completed, e.g. if a BO entity like a travel or a booking has been created, updated or deleted. When the change is saved to the database, the event is raised during the SAVE sequence after the point of no return has passed."
Kind regards
Paul
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.