EWACS (Early Warning And Control System) - A Preventative self-healing tool for SAP PI environment

Swastik Ranjan Nanda
4 min readJun 30, 2021

--

Introduction

There are many scenarios where SAP PI systems are distributed across different zones and each zone has a unique PI system. Here the challenge is to monitor different adapters of all the zonal systems. We need to log into each zone system individually and monitor the adapters of the respective system that is a slow process. It becomes more tedious if we need to analyze any failures that occurred on the adapter engines. The solution to this is the EWACS tool. It monitors all the zonal PI systems on a single platform and is capable of fixing several reoccurring issues on the adapters running on AAE (J2EE based adapter engine) and adapters running on Java SE (in our case -Extended File adapter also known as xlink adapter).

Link to standard documentation for adapters running Java SE.

Link to know more about Extended File adapter.

Capabilities of the tool

  • Monitoring all the zonal PI systems on a single platform
  • Resolving several reoccurring issues on adapters running on J2EE based adapter engine and Java SE

Technologies Used

Java, JEE, Apache Tomcat, HTML, CSS, Bootstrap, JavaScript, APIs

Overall Process Flow Details

overall process flow diagram of EWACS tool

Using MDT Web Services

SAP PI provides a Message Overview servlet an XML based web service. By using this web service we can retrieve the data displayed in the SAP PI Message Monitor in the “Overview” tab.

EWACS fetches all the adapter details using the MDT web services.

Following is the sample java code.

You can fetch the following details.

details fetched from MDT web service

Using SOAP APIs provided by SAP

SAP provides various SOAP APIs that can be consumed to perform various operations. We have used AdapterMessageMonitoringVi APIs to perform various tasks (e.g. — fetching logs, fetching status, fetching message key, resending messages etc.)

Following is a sample java code for fetching the status of a message. Similarly, other operations can be performed.

Getting XML Input for the above program

  • Open the WS Navigator — http:// <host>:<port>/wsnavigator
  • Select Provider System radio button, choose Local Java AS and search for AdapterMessageMonitoringVi, click next
  • You can view several operations.
  • Select one operation and click next
  • Fill the required fields to test, click next
  • Click on the XML Content of input parameters to get the XML structure.

The flow of the EWACS tool

  • EWACS executes 24*7 that fetches the details from all the zonal SAP PI systems using MDT web services and fetches error details from all the hosts where extended file adapters are executing.
  • Once the data is fetched it categorizes the data and acts on several errors. (e.g. — error codes — 500, 503, 501, No listener service registered etc.)
  • There are several auto resolution scripts (PowerShell scripts) that are called by EWACS based on the errors.
  • It is capable of sending mail and raising a ticket to the concerned team post resolutions if required.
  • It logs all the activities of the tool for future reference.
  • It has a dashboard that displays the errors reported to EWACS and the resolution status of each error reported. It is used for tracking purposes.
  • It consists of a web application where overall error counts of all the zones are displayed in one place and errors can be acted directly from here.

Conclusion

EWACS tool reduces business disruptions and human errors. The turnaround time for error resolution is reduced drastically. Failures are resolved as soon as they occurred.

--

--