Business Events with SAP Build Process Automation
With the latest release of SAP Build Process Automation, users can now configure the triggering of a Process from external systems by means of a configured event being emitted from external systems such as SAP S/4HANA Cloud.
What is a Business Event?
A business event is a message that is sent to notify a consumer that an SAP Object Type has changed.
What is event based trigger mechanism?
The event triggers onboard and listens to back-end events emitted from the external source system, and reacts to such events by triggering artifacts such as processes and automation.
Trigger the process using Business events in SAP Build Process Automation when the Sales Order is created in SAP S/4HANA.
This is achieved by creating a process with an event trigger of type salesorder.created. Emit salesorder.created event from the SAP S/4HANA system by creating a sales order. The created process will be executed once the event is emitted from the SAP S/4HANA system and consumed by the subaccount via EVENT mesh.
Enterprise Event Enablement is a technical component of SAP S/4HANA Cloud and SAP S/4HANA On-Premise. It enables the exchange of events across different platforms for seamless event-driven communication. Events from SAP S/4HANA can only be sent to SAP Event Mesh, where they can be used by any recipient.
- SAP S/4 HANA Cloud system is connected with SAP Build Process Automation and is able to receive all required notification events. For more information, see Enable the Consumption of SAP S/4HANA Cloud Events. To have the SAP S/4HANA Cloud extensibility service in the entitlements list you need to register atleast one SAP S/4HANA Cloud system. Added S/4HANA Cloud Accessibility Service
- Set up SAP Event Mesh service in SAP BTP cockpit. For more information, see Setting Up SAP Event Mesh in BTP Cockpit.
- Create queue and queue subscriptions in SAP Event Mesh. For more information, see Manage Queues
- Create a webhook subscription to subscribe to an event queue. For more information, see Manage Queue Subscriptions.
- Create a service key for SAP Build Process Automation. For more information, see Create a Service Key for the SAP Build Process Automation Instance.
- Webhook URL by using the URL from the instance of the SAP Build Process Automation plan standard Service Key API endpoints and adding internal/be/v1/events. As a result, your web-hook URL should look as follows: https://spa-api-gateway-bpi-eu-prod.cfapps.sap.hana.ondemand.com/internal/be/v1/events.
As of now, SAP Build Process Automation supports events from SAP S/4HANA Cloud and SAP S/4HANA On-Premise. It will be scaled up with other external systems(SAP Ariba, SAP SuccessFactors) which is part of the roadmap.
Let’s see in detail, how Business Events can be triggered from SAP S/4HANA and consumed in SAP Build Process Automation.
- Create a business process.
- Add event trigger to the business process.
- All the Events of Sales order business objects will be displayed. In our use case we are triggering Sales Order Event(salesorder.created). Configure the added event trigger with a specific event type.
- Once an event trigger of a specific event type is added as a trigger, event output gets in sync with process inputs.
- Release and deploy the project.
Test the Business Event trigger
Let’s test the Business Events in SAP Build Process Automation by creating a Sales Order from the SAP S/4HANA Cloud.
- Create a Sales Order from SAP S/4HANA.
Create a Sales Order Details of Sales OrderSales Order created with basic detailsSales order ID generated
- Navigate to the Monitor tab in the SAP Build Process Automation tenant.
- The process will be triggered once the Sales Order Created event(salesorder.created) is emitted from SAP S/4HANA Cloud and consumed by the workflow instance. Process workflow instance executed as Sales Order Created event emitted from SAP S/4HANA system, note SalesOrder.
Now you have learnt, how to trigger business events with SAP Build Process Automation. You can explore more in-depth details of Event Mesh, Queue, and Web-hook from here.
Thank you Chiranjit Halder for your support.