on ‎2022 Dec 11 1:28 AM
Hello,
We are porting a oData V2 Fiori project to use a CAP service instead. The CAP service is setup to receive the request and make a call to a on-premise system from BTP. While we can GET entity data, we are not able to receive POST changeset requests that the Fiori application sends. The requests in the changeset req seems to arrive at the server,js already split into individual requests.
Can CAP handle changeset requests? If so, can you please point us to some info.
Thanks for your time
Request clarification before answering.
Hi selvarajb1 ,
At the moment, there's no possibility to register on `$batch` requests. It's only possible to add handlers to the application service, these will be then triggered for the individual requests.
Maybe it helps to implement a custom action. Then you're in full control of the processing.
Best regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
(I'm new to CAP NodeJS)
Do you you know if this feature will be implemented in the futur in CAP NodeJS ?
Do you have any example or indication on how to implement a custom action/handler that could manage '$batch' requests ? (getting all the data contained in the change set at once) ?
Thank you / Best Regards
I'm trying to set up something similar, where I want to select multiple items and use an action to process them together.
Even when using the ChangeSet option, the action logic is executed separately for each item, however, I've noticed that the HTTP header 'x-correlation-id' is the same for all selected items.
Before going ahead, I'd like someone else to confirm: can I use this header to identify all items that were selected?
See the annotation and the custom logic below:
{
$Type : 'UI.DataFieldForAction',
Label : 'Batch Action',
Action: 'ApiService.batchAction',
InvocationGrouping : #ChangeSet
}this.on('batchAction', async (req) => {
console.log('batchAction begin');
console.log(req.headers['x-correlation-id']);
console.log(req.params);
console.log('batchAction end');
});Regards,
Pedro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 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.