Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Punith_Oswal
Participant

In the realm of SAP Cloud Integration, the widespread adoption of prepackaged content is evident across diverse organizations. These ready-to-use solutions undergo regular updates to improve functionality and address evolving needs. However, ensuring timely updates in such varied environments can be challenging without a proactive approach. Adding to the complexity, SAP's lack of notification alerts exacerbates the issue, requiring operations teams to manually monitor the design tab for updates. This manual process leaves room for oversight, potentially delaying critical updates and causing operational disruptions.

To address this challenge and streamline operations, I have developed an iflow solution. This iflow automates the process of checking for updates in the design tab, eliminating the need for constant manual monitoring by the operations team. Upon detecting any available updates, the iflow promptly triggers an email notification to the team, alerting them to take action. By automating this process, the iflow ensures that updates are promptly identified and applied, minimizing the risk of operational issues due to outdated content.

This proactive approach not only simplifies the workflow for the operations team but also ensures that updates are implemented in a timely manner, enhancing the overall efficiency and reliability of SAP Cloud Integration environments.

Scenario : There is update available for the Prepackaged content "SAP Cloud for Customer Integration with SAP S/4HANA Cloud", This update is indicated by a conspicuous green label labeled "Update Available," prominently highlighted for attention.

Snip1.png

Solution- Iflow Design:

In my approach i will make use of predefined SAP Cloud Integration API "IntegrationPackages" to fetch the details related to Integration Packages, Please find the iflow design in the image below.

Snip2.png                                                                                             IFlow Design

Components Breakdown:

1. Set Properties - This content modifier is used to set few properties related to email notifications.

2. Process Call - Request reply with HTTP adapter is used to initiate a GET call to IntegrationPackages API

URL: {{Your Tenant Address}}/api/v1/IntegrationPackages

Authentication - Basic/OAuth

snip 3.png

Response from IntegrationPackages API:

A crucial field labeled <UpdateAvailable> has surfaced with a value of "true" for the "SAP Cloud for Customer Integration with SAP S/4HANA Cloud" package. This indicates the presence of an available update for this specific package. In contrast, other packages not necessitating updates are marked with a value of "false" in the same field.

The idea is utilize this field to filter out the packages for which the updates are available

snip 4.png

 XML CleanUp Groovy : The response comes with XML namespace, this script is used to remove the namespace from the response and have a clean and plain XML at the output.

Filter : Filter component is used to filter out the nodes with below XPATH condition, Vendor = 'SAP' is populated for all the prepackaged content provided by SAP

 XPATH condition : /feed/entry/properties[Vendor='SAP' and UpdateAvailable='true']

snip 7.png

 

Frame XML - This content modifier is used to frame the XML again because the XML header gets vanished from the previous Filter operation.

snip 8.png

Router : If updates are found (Nodes filtered from Filter step), it directs the flow to a route responsible for sending an alert containing the list of packages requiring updates. Conversely, if no updates are detected (Empty output from filter step), it channels the flow to another route designed to send an alert stating that no updates are currently available.

Condition:

snip 5.png

XSLT Mapping: Now, with the list of packages requiring updates in hand, it's essential to distinguish between two types:

1. Integration Packages

2. Adapter Packages.

I've implemented XSLT mapping. This mapping specifically checks the <Mode> field, where the value 'READ_ONLY' uniquely identifies Adapter packages. By segregating the packages accordingly, we can ensure that the alert email clearly presents each type for easier comprehension and effective response.

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" indent="yes"/>

  <!-- Match the root element -->
  <xsl:template match="/">
    <html>
      <head>
        <style>
          table {
            border-collapse: collapse;
            width: 100%;
          }
          th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: left;
          }
          th {
            background-color: #f2f2f2;
          }
        </style>
      </head>
      <body>
        <table>
          <tr>
            <th>Package Name</th>
            <th>Package Type</th>
            <th>Current Version</th>
          </tr>
          <!-- Apply template to process each properties node -->
          <xsl:apply-templates select="//properties"/>
        </table>
      </body>
    </html>
  </xsl:template>

  <!-- Template to process each properties node -->
  <xsl:template match="properties">
    <tr>
      <!-- Get the value of Name -->
      <td><xsl:value-of select="Name"/></td>
      <td>
              <xsl:choose>
          <!-- If Mode is "Read_Only", output "Adapter"; if not, output "Integration Flow" -->
          <xsl:when test="Mode = 'READ_ONLY'">Integration Adapter Package</xsl:when>
          <xsl:otherwise>Integration Package</xsl:otherwise>
        </xsl:choose>
        </td>
      <!-- Get the value of Version -->
      <td><xsl:value-of select="Version"/></td>
    </tr>
  </xsl:template>
</xsl:stylesheet>

 

 

 

 That's it for now. We'll transfer this data to the email body using Groovy. Once we've completed the cosmetic enhancements and beautification of the email, our alert will be ready for dispatch. I won't delve into the email Groovy code in this blog since I've already covered it comprehensively in a previous post. You can refer to that blog (link below) to ensure your email alerts are not only functional but also visually appealing and user-friendly.

SAP Cloud Integration - Make your Alert Email look simple and beautiful 

Email Notification : You can many fields from the response in your email alert, I have also added current version column for more information.

 

 

Updates Available:

snip 6.png

No Updates Available:

SNIP 9.png

This proactive approach not only simplifies the workflow for the operations team but also ensures that updates are implemented in a timely manner, enhancing the overall efficiency and reliability of SAP Cloud Integration environments.

I hope this helps.

Cheers, 
Punith

 

 

1 Comment
Labels in this area