<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhanu Chandar on Medium]]></title>
        <description><![CDATA[Stories by Bhanu Chandar on Medium]]></description>
        <link>https://medium.com/@bhanusklm143?source=rss-f6e02071a49c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-CF2t7KP4CgTk4ca</url>
            <title>Stories by Bhanu Chandar on Medium</title>
            <link>https://medium.com/@bhanusklm143?source=rss-f6e02071a49c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:41:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhanusklm143/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automating Scheduled Reminders Using ns0:dayTimeDuration with Date and Status Checks]]></title>
            <link>https://medium.com/@bhanusklm143/automating-scheduled-reminders-using-ns0-daytimeduration-with-date-and-status-checks-6282af8018e4?source=rss-f6e02071a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6282af8018e4</guid>
            <category><![CDATA[oicgen3]]></category>
            <dc:creator><![CDATA[Bhanu Chandar]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 14:09:58 GMT</pubDate>
            <atom:updated>2025-06-20T14:10:38.323Z</atom:updated>
            <content:encoded><![CDATA[<p>This article explains how to use the ns0:dayTimeDuration function in your integration (such as Oracle Integration Cloud or XSLT) to automate sending reminders at fixed intervals, based on both a date field and a status field from your data source. The approach ensures reminders are sent only when both timing and status criteria are met.</p><h3>Use Case</h3><p><strong>Requirement:</strong><br> Send up to three reminder notifications for each record, spaced 3 days apart (i.e., after 3, 6, and 9 days from a reference date), but only if the record has a specific status (e.g., “Pending” or “Active”).</p><p><strong>Data Sources:</strong></p><ul><li>The reference date comes from a database table or a file column.</li><li>The status field is also sourced from the same record.</li><li>Reminder intervals are stored in a lookup table using ISO 8601 durations:</li><li>REM1 = P3D (3 days)</li><li>REM2 = P6D (6 days)</li><li>REM3 = P9D (9 days)</li></ul><h3>Implementation Steps</h3><h3>1. Store Reminder Intervals</h3><p>Maintain a lookup (in a database, integration variable, or configuration) with the following key-value pairs:</p><p>Key Value REM1 P3D REM2 P6D REM3 P9D</p><h3>2. Calculate Reminder Dates</h3><p>For each reminder, calculate the date by subtracting the duration from the current date:</p><pre>HTML, XML</pre><pre><br>&lt;xsl:variable name=&quot;vREM1&quot; select=&quot;fn:string(fn:current-date() - ns0:dayTimeDuration(&#39;P3D&#39;))&quot;/&gt;<br>&lt;xsl:variable name=&quot;vREM2&quot; select=&quot;fn:string(fn:current-date() - ns0:dayTimeDuration(&#39;P6D&#39;))&quot;/&gt;<br>&lt;xsl:variable name=&quot;vREM3&quot; select=&quot;fn:string(fn:current-date() - ns0:dayTimeDuration(&#39;P9D&#39;))&quot;/&gt;</pre><h3>3. Compare with Reference Date and Status</h3><p>For each record, compare the reference date and status with the calculated reminder dates and required statuses:</p><pre>HTML, XML</pre><pre>&lt;xsl:if test=&quot;($recordDate = $vREM1 or $recordDate = $vREM2 or $recordDate = $vREM3)<br>              and ($recordStatus = &#39;Pending&#39; or $recordStatus = &#39;Active&#39;)&quot;&gt;<br>  &lt;!-- Trigger reminder notification --&gt;<br>&lt;/xsl:if&gt;</pre><ul><li><strong>Date Check:</strong> The record date must match any of the calculated reminder dates.</li><li><strong>Status Check:</strong> The record status must be either “Pending” or “Active” (adjust as needed for your business rules).</li><li><strong>Action:</strong> Only if both conditions are met, a reminder notification is sent.</li><li>Make use of switch condition.</li></ul><h3>4. Schedule Integration</h3><ul><li>Schedule the integration to run once per day.</li><li>Each run checks all records and sends reminders as appropriate.</li></ul><h3>Summary</h3><p>By using ns0:dayTimeDuration for interval calculations and combining date and status checks, you can automate and control the sending of reminders with precision. This approach ensures reminders are only sent for records that are both due (based on date) and in the correct status, improving efficiency and reducing unnecessary notifications.</p><p><strong>Tip:</strong><br> You can easily extend this pattern for different intervals or additional statuses by updating your lookup and logic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6282af8018e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REST API Bulk Operations Using Parts Payload: CRUD Simplified]]></title>
            <link>https://medium.com/@bhanusklm143/rest-api-bulk-operations-using-parts-payload-crud-simplified-5680ece7d617?source=rss-f6e02071a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5680ece7d617</guid>
            <category><![CDATA[oic]]></category>
            <category><![CDATA[oicgen3]]></category>
            <dc:creator><![CDATA[Bhanu Chandar]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 13:48:10 GMT</pubDate>
            <atom:updated>2025-06-20T13:49:40.586Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern enterprise APIs often need to process multiple records in a single request for efficiency. Oracle REST APIs and similar platforms support <strong>bulk operations</strong> using a “parts payload” — a powerful approach for batch processing Create, Read, Update, and Delete (CRUD) operations.</p><h3>How It Works</h3><h4>1. API Structure</h4><p>To perform bulk operations, the REST API endpoint is split into three logical parts:</p><ul><li><strong>Host:</strong><br> https://any-rest-api.com (Configured in the connection)</li><li><strong>Resource Base Path:</strong><br> /fscmRestApi/resources/11.13.18.05 (Set as the REST configuration endpoint relative URI)</li><li><strong>Entity Path:</strong><br> /cashBanks/{BankPartyId} (Used in the payload’s path, with {BankPartyId} mapped from your source data)</li></ul><h4>2. Media Type Configuration</h4><ul><li><strong>Request Media Type:</strong><br> Set to application/vnd.oracle.adf.batch+json<br> (Choose &quot;Other Media Type&quot; and enter this value)</li></ul><h3>Bulk Operations with Parts Payload</h3><h4>A. Bulk Update or Delete</h4><ul><li><strong>HTTP Method:</strong> PATCH (for update), DELETE (for delete)</li><li><strong>Payload Example:</strong></li></ul><pre>JSON</pre><pre>{<br>  &quot;parts&quot;: [<br>    {<br>      &quot;id&quot;: &quot;1&quot;,<br>      &quot;path&quot;: &quot;/cashBanks/{BankPartyId1}&quot;,<br>      &quot;operation&quot;: &quot;delete&quot;<br>    },<br>    {<br>      &quot;id&quot;: &quot;2&quot;,<br>      &quot;path&quot;: &quot;/cashBanks/{BankPartyId2}&quot;,<br>      &quot;operation&quot;: &quot;delete&quot;<br>    }<br>  ]<br>}</pre><ul><li>For updates, set &quot;operation&quot;: &quot;update&quot; or &quot;operation&quot;: &quot;patch&quot; and include the fields to update in the payload.</li></ul><h4>B. Bulk Create (POST)</h4><ul><li><strong>HTTP Method:</strong> POST</li><li><strong>Operation Field:</strong> The value for &quot;operation&quot; can be &quot;create&quot; or &quot;post&quot; depending on the API specification. Always check the API documentation to confirm which is required.</li><li><strong>ID Generation:</strong><br> For the &quot;id&quot; field in each part, you can:</li><li>Use the position() function in the mapper to auto-generate sequential IDs for each part.</li><li>Hardcode values if needed, but using position() ensures uniqueness and order.</li><li><strong>Payload Example:</strong></li></ul><pre>JSON</pre><pre>{<br>  &quot;parts&quot;: [<br>    {<br>      &quot;id&quot;: &quot;1&quot;,  // Use position() in mapper for dynamic ID generation<br>      &quot;path&quot;: &quot;/employees&quot;,<br>      &quot;operation&quot;: &quot;create&quot;,  // Or &quot;post&quot; based on API spec<br>      &quot;payload&quot;: {<br>        &quot;employeeId&quot;: &quot;E1001&quot;,<br>        &quot;name&quot;: &quot;John Doe&quot;,<br>        &quot;email&quot;: &quot;john.doe@example.com&quot;<br>      }<br>    },<br>    {<br>      &quot;id&quot;: &quot;2&quot;,<br>      &quot;path&quot;: &quot;/employees&quot;,<br>      &quot;operation&quot;: &quot;create&quot;,<br>      &quot;payload&quot;: {<br>        &quot;employeeId&quot;: &quot;E1002&quot;,<br>        &quot;name&quot;: &quot;Jane Smith&quot;,<br>        &quot;email&quot;: &quot;jane.smith@example.com&quot;<br>      }<br>    }<br>  ]<br>}</pre><p><em>Tip: In OIC Mapper, map the </em><em>&quot;id&quot; field using the </em><em>position() function to automatically assign incremental IDs to each part.</em></p><ul><li>Map the payload fields from your source data to the target structure.</li></ul><h3>CRUD Operations Supported</h3><ul><li><strong>Create:</strong> Use &quot;operation&quot;: &quot;create&quot; or &quot;operation&quot;: &quot;post&quot; with a payload, as per API spec.</li><li><strong>Read:</strong> Typically handled via GET, but batch GET is less common in this pattern.</li><li><strong>Update:</strong> Use &quot;operation&quot;: &quot;update&quot; or &quot;operation&quot;: &quot;patch&quot; with updated fields in the payload.</li><li><strong>Delete:</strong> Use &quot;operation&quot;: &quot;delete&quot; with the path specifying the entity to remove.</li></ul><h3>Use Cases</h3><ul><li><strong>Bulk Data Migration:</strong> Move large sets of records between systems efficiently.</li><li><strong>Mass Updates:</strong> Apply changes (e.g., status updates) to many records in one go.</li><li><strong>Batch Deletion:</strong> Remove obsolete or duplicate records in a single request.</li><li><strong>Onboarding:</strong> Create multiple entities (like users or accounts) at once.</li></ul><h3>Advantages</h3><ul><li><strong>Efficiency:</strong> Reduces the number of API calls, minimizing network overhead.</li><li><strong>Atomicity:</strong> Ensures all operations in the batch are processed together.</li><li><strong>Consistency:</strong> Simplifies error handling and rollback for failed operations.</li><li><strong>Performance:</strong> Faster processing compared to single-record operations.</li><li><strong>Dynamic ID Generation:</strong> Using position() in the mapper ensures unique and sequential IDs for each part, reducing manual errors.</li></ul><h3>Quick Setup Checklist</h3><ol><li><strong>Set Connection Host:</strong> <a href="https://any-rest-api.com/">https://any-rest-api.com</a></li><li><strong>Configure Endpoint Resource URI:</strong> /fscmRestApi/resources/11.13.18.05</li><li><strong>Use Path in Payload:</strong> /cashBanks/{BankPartyId} (map from source)</li><li><strong>Set Media Type:</strong> application/vnd.oracle.adf.batch+json</li><li><strong>Prepare Parts Payload:</strong> List of operations (create, update, delete) as shown above.</li><li><strong>ID Generation:</strong> Use position() in the mapper for the &quot;id&quot; field, or hardcode as needed.</li><li><strong>Operation Field:</strong> Use &quot;create&quot; or &quot;post&quot; for POST, as per API documentation.</li></ol><p><strong>In summary:</strong><br> Bulk operations using parts payload streamline CRUD tasks, making integrations more robust, efficient, and scalable — ideal for enterprise data management and automation. Leveraging dynamic ID generation with position() further enhances reliability and reduces manual mapping effort.</p><p>Certainly! Here’s your enhanced note section with the additional point included:</p><p><strong>Notes:</strong></p><ul><li>Partial errors may result in some records being processed and others not, depending on API settings.</li><li>In “all-or-none” mode, either all records succeed or none are processed.</li><li>If “all-or-none” is enforced: The entire batch is rolled back if any single record fails. No records are committed in case of any failure. The response will indicate the failure, and you must correct the errors and resubmit the batch.</li><li>In case of any error, you can call the purge integration to remove data associated with the failed run. Since each run has a unique loadId, you can use this identifier to purge only the relevant records efficiently.</li><li>This works well for VBCS BOs.</li><li>Also we can use batching in xslt itself if we want process source data in batches.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5680ece7d617" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Date Format Conversion]]></title>
            <link>https://medium.com/@bhanusklm143/date-format-conversion-e1dad40869f9?source=rss-f6e02071a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1dad40869f9</guid>
            <category><![CDATA[oic]]></category>
            <dc:creator><![CDATA[Bhanu Chandar]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 19:24:14 GMT</pubDate>
            <atom:updated>2025-06-19T19:24:14.936Z</atom:updated>
            <content:encoded><![CDATA[<h3>Oracle Integration Cloud (OIC) Tip: Easy Date Format Conversion</h3><p>Need to convert dates in OIC from M/D/YYYY (e.g., 1/25/2024) to formats like YYYY-M-D or YYYY/MM/DD? Here’s how you can do it — quickly and simply.</p><h3>1. Using OIC String Functions (No Leading Zeros)</h3><p>To convert 1/25/2024 to 2024–1–25, use:</p><pre>concat(<br>  substring-after(substring-after(m/d/year, &quot;/&quot;), &quot;/&quot;), &quot;-&quot;, <br>  substring-before(m/d/year, &quot;/&quot;), &quot;-&quot;, <br>  substring-before(substring-after(m/d/year, &quot;/&quot;), &quot;/&quot;)<br>)</pre><p>concat( substring-after(substring-after(m/d/year, “/”), “/”), “-”, substring-before(m/d/year, “/”), “-”, substring-before(substring-after(m/d/year, “/”), “/”) )</p><p>Note: This works for formats without leading zeros. So, 1/5/2024 becomes 2024–1–5.</p><h3>2. For Leading Zeros (Always YYYY-MM-DD Format)</h3><p>If you need the output as 2024–01–25 (with leading zeros), use this JavaScript function:</p><pre>function convertDateFormat(pDate) {<br>    const [month, day, year] = pDate.split(&#39;/&#39;).map(Number);<br>    return new Date(Date.UTC(year, month - 1, day)).toISOString().substring(0, 10);<br>}</pre><p>This ensures both month and day are always two digits.</p><p>Summary:</p><ul><li>Use OIC string functions for simple reformatting (no leading zeros).</li><li>Use JavaScript for strict YYYY-MM-DD formatting (with leading zeros).</li></ul><p>Choose the method that fits your integration needs !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1dad40869f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>