Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
DJ23
Employee
Employee
4,500

Introduction: 


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. 

Use case:

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.

Note:

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.

Prerequisites:

  1. 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

  2. Set up SAP Event Mesh service in SAP BTP cockpit. For more information, see Setting Up SAP Event Mesh in BTP Cockpit. 

  3. Create queue and queue subscriptions in SAP Event Mesh. For more information, see Manage Queues

  4. Create a webhook subscription to subscribe to an event queue. For more information, see Manage Queue Subscriptions.

  5. Create a service key for SAP Build Process Automation. For more information, see Create a Service Key for the SAP Build Process Automation Instance. 

  6.  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. 





Supported scenarios: 

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.

Steps:

  1. Create a business process.

  2. Add event trigger to the business process.

  3. 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.



  4. Once an event trigger of a specific event type is added as a trigger, event output gets in sync with process inputs. 

  5. 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.

Steps:

  1. Create a Sales Order from SAP S/4HANA.
    Create a Sales Order Details of Sales OrderSales Order created with basic detailsSales order ID generated

  2. Navigate to the Monitor tab in the SAP Build Process Automation tenant.

    1. 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.




 

Conclusion: 

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 testusere2e for your support.
6 Comments