2024 Aug 20 2:58 PM
Hello,
I have a CAP application with a draft enabled odata v4 service. In the storyboard under application logic I'm not able to create an event handler for the draft entity. (only for the entity itself)
Anybody an idea ?
2024 Aug 28 9:07 AM
Hi @T1mey , from application logic (custom event handler) point of view, no distinguish on the draft entity or not, as both draft info and the committed entity data are shared in the same db entity table. And the corresponding app logic will get triggered when the draft entity standard events, such as READ, CREATE, etc.
Would you show more detail in which case the handler is not triggered as expected? thanks.
Regards,
Xin
2024 Aug 28 9:28 AM - edited 2024 Aug 28 9:30 AM
Basically I want to add a before "UPDATE" handler for my draft entity...
Should look at the end like this ... (added the expected code block by myself, this would get overridden as that file is generated)
and in the wizard I can only select the entity, not the draft.
2024 Aug 28 11:14 AM
Thanks for the clarification, I got it now. In that case, no support yet from our application logic editor for this draft relevant entity.
As it's about Fiori UI specific scenario, I would like to know more what's the requirement for such draft entity handler? As I am not quite sure whether the existing abilities can do the same purpose, thanks.
2024 Aug 28 11:37 AM
So simple example... You have a dropdown on UI and if the selection changes you want to execute some logic...
In that case you'll need to override the before UPDATE event handler for the draft entity.
2024 Aug 28 12:00 PM
Thanks, we will have further evaluation to see how to support this scenario from the application logic editor.
2024 Oct 31 8:28 AM
Update on this topic: the draft entity will soon be supported in the Application Logic Editor through a new dropdown option when adding new app logic. This feature is expected to be available in production around the end of November, thanks.
2024 Oct 31 8:33 AM
Great to hear !!! Thanks a lot, that makes it useable for us.
Looking forward to test it 😉
Wednesday
Hello @xinye ,
I realized that the storyboard now supports the draft entity handler creation. I was able to create my draft handlers, but somehow it disappeared again.
Could you tell me when the draft dropdown entry is going to be displayed, based on which criteria?
And we realized a bug in the storyboard if a service has a namespace. (e.g. com.company.test)
Wednesday
Hi @T1mey Sorry about the inconvenience, the latest release (including the application logic editor) was rolled back due to a compatible issue, it's assumed to be recovered soon. I can keep you updated once it's ready.
Wednesday - last edited Wednesday
Thanks a lot for the info @xinye . Any way to get the "new" version installed to be able to proceed with our development?
Thursday
Hi @T1mey The new version will be available soon, no manual install required. Till then, would you go ahead with manual changes? However, please note to backup your manual changes to avoid the content is overridden triggered by the UI change within Application Logic Editor.