<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Changeset processing in CAP Node.JS in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/14017041#M4903447</link>
    <description>&lt;P&gt;I'm trying to set up something similar, where I want to select multiple items and use an action to process them together.&lt;/P&gt;&lt;P&gt;Even when using the ChangeSet option, the action logic is executed separately for each item, however, I've noticed that the HTTP header&amp;nbsp;'x-correlation-id' is the same for all selected items.&lt;/P&gt;&lt;P&gt;Before going ahead, I'd like someone else to confirm: can I use this header to identify all items that were selected?&lt;/P&gt;&lt;P&gt;See the annotation and the custom logic below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    $Type : 'UI.DataFieldForAction',
    Label : 'Batch Action',
    Action: 'ApiService.batchAction',
    InvocationGrouping : #ChangeSet
}&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;this.on('batchAction', async (req) =&amp;gt; {
      console.log('batchAction begin');
      console.log(req.headers['x-correlation-id']);
      console.log(req.params);
      console.log('batchAction end');
});&lt;/LI-CODE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2025 09:54:13 GMT</pubDate>
    <dc:creator>pedro_iranzo</dc:creator>
    <dc:date>2025-02-14T09:54:13Z</dc:date>
    <item>
      <title>Changeset processing in CAP Node.JS</title>
      <link>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaq-p/12647908</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;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. &lt;/P&gt;
  &lt;P&gt;Can CAP handle changeset requests? If so, can you please point us to some info.&lt;/P&gt;
  &lt;P&gt;Thanks for your time&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 01:28:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaq-p/12647908</guid>
      <dc:creator>former_member833069</dc:creator>
      <dc:date>2022-12-11T01:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Changeset processing in CAP Node.JS</title>
      <link>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/12647909#M4744879</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;selvarajb1&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;Maybe it helps to implement a custom action. Then you're in full control of the processing.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 12:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/12647909#M4744879</guid>
      <dc:creator>david_kunz2</dc:creator>
      <dc:date>2022-12-13T12:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Changeset processing in CAP Node.JS</title>
      <link>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/12647910#M4744880</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;(I'm new to CAP NodeJS)&lt;/P&gt;&lt;P&gt;Do you you know if this feature will be implemented in the futur in CAP NodeJS ?&lt;BR /&gt;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) ?&lt;/P&gt;&lt;P&gt;Thank you / Best Regards&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2023 10:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/12647910#M4744880</guid>
      <dc:creator>mouradche</dc:creator>
      <dc:date>2023-07-23T10:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Changeset processing in CAP Node.JS</title>
      <link>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/12647911#M4744881</link>
      <description>&lt;P&gt;Hi Mourad,&lt;/P&gt;&lt;P&gt;There are no specific plans to support custom handling of $batch requests.&lt;BR /&gt;Regarding the action/function: You can define the input/output of your function and write code to process it, no `$batch` needed here.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2023 11:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/12647911#M4744881</guid>
      <dc:creator>david_kunz2</dc:creator>
      <dc:date>2023-07-23T11:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Changeset processing in CAP Node.JS</title>
      <link>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/14017041#M4903447</link>
      <description>&lt;P&gt;I'm trying to set up something similar, where I want to select multiple items and use an action to process them together.&lt;/P&gt;&lt;P&gt;Even when using the ChangeSet option, the action logic is executed separately for each item, however, I've noticed that the HTTP header&amp;nbsp;'x-correlation-id' is the same for all selected items.&lt;/P&gt;&lt;P&gt;Before going ahead, I'd like someone else to confirm: can I use this header to identify all items that were selected?&lt;/P&gt;&lt;P&gt;See the annotation and the custom logic below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    $Type : 'UI.DataFieldForAction',
    Label : 'Batch Action',
    Action: 'ApiService.batchAction',
    InvocationGrouping : #ChangeSet
}&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;this.on('batchAction', async (req) =&amp;gt; {
      console.log('batchAction begin');
      console.log(req.headers['x-correlation-id']);
      console.log(req.params);
      console.log('batchAction end');
});&lt;/LI-CODE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 09:54:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/changeset-processing-in-cap-node-js/qaa-p/14017041#M4903447</guid>
      <dc:creator>pedro_iranzo</dc:creator>
      <dc:date>2025-02-14T09:54:13Z</dc:date>
    </item>
  </channel>
</rss>

