“Events-to-Business Actions” architecture is an event-driven framework based on SAP Business Technology Platform (SAP BTP) to respond to and integrate with events generated from industrial production processes in plants, warehouses, and logistics into enterprise business systems, triggering associated business processes to enhance enterprise operations and enable rapid decision-making. The framework can integrate with events processed via Microsoft Azure services.
In the upcoming sections of the blog post, we will describe the business scenario, possible use cases wherein this generic framework can be leveraged, recommended architecture(s), and a quick demo followed by the instructions to deploy the framework from a GitHub repository.
As businesses expand, their enterprise IT landscapes become more intricate, and they need to automate and optimize daily tasks with various software applications, systems, and processes. To facilitate communication across these landscapes without overburdening the systems, decoupled/asynchronous communication between application endpoints is an effective solution to improve performance and scalability. Event-driven architecture is the answer here. An event is a change in the state of the business entity in a software system. Refer Avinash Vaidya’s blogpost for more explanation about events and event driven architecture.
Companies are driving the digitization of the factory, plants, warehouses, and business networks and creating an ecosystem by linking Information Technology (IT) with Operational Technology (OT). Bridging the gaps between different landscapes and processes with integrated frameworks is key for building a seamless, efficient, bi-directional collaborative ecosystem. For instance, in a supply chain logistics scenario, the movement of inventory (e.g., product, pallet) often indicates the next step in the business process. Thus, the manual effort to capture process steps, update the IT systems and trigger subsequent processes can be minimized by integrating events, enriching them with business context and integrating them into business processes.
Industrial processes in factories, plants, warehouses, and logistics generate critical events from disparate and discrete industrial systems and there is a need to trigger business processes as a response to these events. However manual operations are still the primary means of initiating these processes. (e.g., goods issue, goods receipt, replenishment processes, service ticketing, reacting to changing conditions during transport and so on) and there is limited ability to react to changing conditions.
Our aim is to adopt event-driven architecture, by building an open-source framework on the SAP Business Technology Platform (SAP BTP) which can integrate events generated from non-SAP platforms and solutions into SAP business processes thereby extending the value of existing SAP applications and processes. The events may originate from various sources such as IoT platforms, mobile and web applications, enterprise systems, and industrial production, logistics platforms, and so on. Thus, this framework helps in making business intelligent and interconnected to improve overall process efficiency.
Figure-1: “Events-to-Business Actions” Framework
This framework is designed for extensibility and allows the user to customize the application development as per their business requirement. It is based on the MVC (Model View Controller) design pattern and has reusable components for modelling and processing the business actions, automating the SAP BTP service instance creation, inbuilt integration with SAP Destination Service etc. which can be used to configure and build applications. The framework provides out-of-the-box UI for actions, business rules and services definitions. This allows the user to design the orchestration and chaining of actions based on the events.
Introducing the “Events-to-Business Actions” framework
An event-driven framework is an extension application on SAP BTP for the execution of SAP business workflows triggered by events. This enables us to construct event orchestration from any system that produces events, regardless of the source being a non-SAP application or 3rd party IoT platform. In this case, we have first considered Microsoft Azure as part of the partnership with Microsoft and the Event Integration co-engineering work stream.
This framework makes it easy for developers to create extension applications to link events to the business processes of SAP systems. It can be used with multiple scenarios such as intelligent replenishment, connected manufacturing, connected logistics, customer service (e.g., service request creation), among others.
As shown in Figure-2, this framework provides an out-of-the-box UI modeler that is intuitive to configure different types of actions like workflow or process execution that can be taken in SAP backend systems as an outcome of the incoming events from external sources via SAP Event Mesh. Example actions include the creation of a purchase requisition in an SAP S/4HANA system, updating inventory in the backend system, raising service requests in an SAP Customer Experience system and so on. For effective and meaningful action definition, these actions can be chained with pre-action and post-action activities.
This framework leverages business rules capability within the SAP Build Process Automation, which lets you automatically choose a business action that should be executed for an incoming event based on the configured decision tables.
Figure-2: UI modeler
Read the blogpost [Part-2] Explore “Events-To-Business Actions” framework(link to be updated) by Praveen Padegal to gain a more comprehensive understanding of the framework.
You can use this framework to configure the bi-directional flow of events between systems
- Inbound to SAP S/4HANA, where events flow from Microsoft Azure, will be sent to SAP Event Mesh and finally to SAP S/4HANA (or any other supported SAP system).
- Outbound from SAP S/4HANA, Events that originate in SAP S/4HANA when you do some operation on Business Objects (such as creating a purchase requisition). The event gets published into a topic of SAP Event Mesh, from which the event gets transported to Azure Event Grid’s partner topic. A queue bound with this partner topic (through Event Subscription) receives the event.
Figure-3 depicts the outbound scenario, read the blogpost [Part-3] Integrate Events between SAP and Microsoft Azure using Event Mesh Connectivity Bridge Service (Beta) by Lalit Mohan Sharma to gain a more comprehensive understanding of this scenario.
Figure-3: Outbound scenario
Industry 4.0 use cases supported by the framework
To illustrate the usage of this framework and reference architecture, refer to the examples of sample use cases
In an example scenario in manufacturing and logistics, we see raw materials arrive at the warehouse and as these products or pallets or handling units are scanned using RFID (or similar technologies) generate an event and based on the event a goods receipt needs to be posted in SAP S/4HANA. Similarly, there is a need to integrate different events across the processes to SAP workflows/business processes (as explained in the below table with a few examples). Our approach is not limited to industries, regions, customer size or LOB (Line of Business).
Read the blogpost [Part-4] Leveraging ‘Events to Business Actions Framework’ for SAP Service Cloud Scenario by Ajit Kumar Panda built a new scenario leveraging this framework for the Service Order creation process in SAP Service Cloud.
Read the blogpost [Part-5] Extending Event-Driven Applications for Business Users Collaboration with SAP BTP and Microsoft Teams <link to be updated> by Uma Anbazhagan to see how to extend the collaborative experience to business users by taking actions in MS Teams with the alerts coming from event-based applications as depicted in Figure-4.
Figure-4: Collaborative experience
The architecture is based on leveraging the services of SAP Business Technology Platform which includes event-based integration with SAP Event Mesh, Event Mesh Connectivity Bridge (Beta), Advanced Event Mesh (to be updated), Business rules capability in SAP Build Process Automation coming from SAP Workflow Management, SAP Destination Service, SAP Private Link service, SAP Connectivity Service and Cloud Connector and a Node.js extension application on the SAP Cloud Foundry runtime.
The two solution diagrams below depict the architectures with SAP Business Technology Platform, Microsoft Azure and SAP S/4HANA (on-premise hosted on Hyperscalers and Microsoft Azure-specific).
Figure-6: High-level architecture with SAP S/4HANA on-premise and private cloud
The following steps depict the information flow across systems (in both scenarios)
(1) Event is triggered from Microsoft Azure and is published on to SAP Event Mesh.
In Event-to-Business-Action framework (extension app),
(2) processor module endpoint is subscribed to SAP Event Mesh to receive the event.
(3) processor module leverages the Business Rules capability of SAP Build Process Automation to derive business action (For example, Purchase Order Requisition creation in SAP S/4HANA system) based on certain characteristics of incoming event.
(4), (5), (6), (7) and (8) processor module triggers the defined action in the SAP S/4HANA system using the SAP Destination Service and SAP Private Link Service.
In case SAP S/4HANA is on-premise and private cloud (refer to Figure-6) – communication with SAP S/4HANA happens via SAP Connectivity Service and Cloud Connector.
(9) and (10) SAP S/4HANA publishes an event (e.g., Purchase Order Requisition creation) to Microsoft Azure Event Grid via SAP Event Mesh Connectivity Bridge for further processing by Microsoft Azure applications.
Key Advantages of This Architecture
Developers implementing this framework architecture would benefit from the following design considerations.
- A flexible and generic framework that can be easily extensible for any Line of Business (LoB) scenario /workflow/process and any source system events.
- Event-driven integration architecture with SAP Event Mesh as a central hub, including a bi-directional flow of events (Microsoft Azure to SAP S/4HANA and vice versa). We are also evaluating on leveraging Advanced Event Mesh (to be updated soon).
- Enriched with resilient and high availability architectural patterns. (Read the blogpost by ShanthaKumar Krishnaswamy on how to achieve distributed resiliency of CAP applications).
- Network security-focused design with SAP Private Link specifically for RISE with SAP customers between SAP BTP on Azure (any region) and SAP S/4HANA on Microsoft Azure(Read the blog post Extend your Business Processes with the new SAP Private Link service by Harutyun Ter-Minasyan on how to securely consume data from the SAP S/4HANA system)
The fill level of the container is monitored by a device, i.e., an ultrasonic sensor. The device regularly communicates the fill level to the data platform (in our pilot project Microsoft Azure IoT Central) using standard protocols, such as REST or MQTT and communication, such as LoRaWAN. When the fill level exceeds a threshold (rule: fill-level larger x%) we trigger the event of the exception data in SAP Business Technology Platform (SAP BTP). The exception event is published to SAP Event Mesh. Based on business rules the content of the event is interpreted and enriched to create functional transactions for “Create SAP Purchase Order (PO) Requisition”. The PO Request is posted automatically in the SAP business system, i.e., SAP S/4HANA. The creation of the PO Request leads to a feedback flow, i.e., status change from SAP to Microsoft Azure IoT Central (or any other IoT landscape) which updates the status field in the device’s cloud property and/or other functions, as Microsoft Teams or Email. After emptying the container by the external provider, the status is reset.
You can watch a demo here that showcases the PoC scenario
Scenario Setup and Deployment
To get the entire scenario working, there are prerequisites and initial configurations required in SAP Business Technology Platform, Microsoft Azure, and SAP S/4HANA.
Please refer to the published GitHub repository and Discovery Center mission which contains code samples and instructions for implementing this scenario
- GitHub Repo: Framework & Outbound Scenario
- Discovery Center mission: (to be updated)
An early version of the “Events-to-Business Actions” framework has been released on GitHub under the SAP Sample Code License Agreement. Feel free to check out that agreement for any specifics, but in general, you can “use, copy, and modify the sample code solely for your internal business purposes” subject to the terms of the license.
We have created this reference architecture with accompanying sample code which can be configured and extended for a variety of scenarios. However, it is up to the end user to utilise the code, make modifications and keep it maintained for productive use.
We hope this blog has given you a brief idea on how to integrate events generated from external sources (Microsoft Azure) to trigger different business actions/workflows/process in SAP backend systems. We will publish further blog posts with an updated version of this architecture and framework with additional integrations.
On the SAP side, Many thanks to my team members Uma Anbazhagan & Praveen Padegal from SAP for driving this project by collaborating with all the stakeholders involved in the engagement. Lalit Mohan Sharma for building an outbound scenario leveraging SAP Event Mesh Connectivity Bridge and Ajit Kumar Panda for supporting the development of the framework and finally Anirban Majumdar for leadership support for this project.
We would like to express our sincere gratitude to Pradeep Panda and Karsten Strothmann from SAP Event Mesh teams as well as Marcus Behrens and Rhea Kumar from Digital Supply Chain teams at SAP for their support.
On the NTT DATA Business Solutions side, Special thanks to Marco Lampe and Henrik Brüntrup for technical guidance.
To learn more about SAP BTP, see the learning journey on SAP Learning called Discover SAP Business Technology Platform, a great introduction to BTP and the Intelligent Enterprise strategy to see what it’s all about for free or check out Develop Advanced Extensions with SAP Cloud SDK plus much more free learning at SAP Learning site.
For more information about this topic or to ask a question, please contact us at email@example.com