6 - Capture Events in SAP Build Process Automation
- How to specify an event to be captured by the SAP Build Process Automation tenant
- How to create a process project
- How to create an event-based trigger for the project
- How to monitor a triggered process (process instance)
Prerequisites
- You have completed the previous tutorial for the event-based processes CodeJam, Send events to SAP Build Process Automation.
- Step 1
Since we want to use events, we must let SAP Build know which events we want consume in our SAP Build projects, by creating an event project. Such event projects can be based on standard SAP S/4HANA Cloud events, or our own custom events.
Since we created a custom event, we will have to provide an event definition, or spec. Below is part of that spec.

Download our Business Partner event spec.
- Step 2
-
In the cockpit of your trial account, go to Instances and Subscriptions.

-
Click the icon next to SAP Build Process Automation.

The SAP Build lobby now opens, where you can create apps, process and business sites.

On the left are a bunch of supporting / administrative tasks, including a place for defining events.
-
- Step 3
If we want to consume events in SAP Build projects, we must let SAP Build know which events to capture. We do that by creating an event project.
Once defined, each process project can create an event trigger for one of those events so that SAP Build notifies it when such an event arrives.
-
Click Events.

-
Click Create.
Select Upload Specification, and select the spec file you downloaded in the previous step.

-
Click Browse Files, and select the file you downloaded in the previous step.

After selecting the file, you should file details.

Click Next.
You will see details about the event, including the data it will pass with the event (Output).

-
Click Add.
Keep the project name and description as is, and click Create.

You will now see the event project opened, with the editable version showing. There is nothing to change. You can close the tab.

Go back to the Events area of the main SAP Build window. Select the tile (not the name) of your new event. On the right select the Versions tab.

When you created the project, SAP Build automatically released and published the project (version 1.0.0), so you can already use it in your processes.
-
- Step 4
-
Go to the SAP Lobby.

-
Click Create.
Select Automated Process, and click Next.

Select Process, and click Next.

-
Enter the following:
Field Value Project Name Badges Description Process project for creating badges whenever a new business partner is created. Click Review.

On the Summary page, click Create.

-
Since you indicated this was a process project (as opposed to an automation project), you will get a popup asking you to name the process artifact inside the project, too.
Enter the following (the identifier is automatically generated).
Field Value Name Badge Process Description This is the process that will manage creating a badge when a business partner is created. Click Create.

The project opens to the process.

The process is empty except for:
-
Trigger: A place for you to specify what will trigger the process.
-
End: Indicates the process is completed.
The plus sign, +, enables you to add all sorts of other types of steps to your process.
REMINDER: You first created an SAP Build Process Automation project, which can contain all kinds of artifacts. Then you created your first artifact, a process. Projects can have many processes and automations, and those can themselves contain other processes and automations. It can get complicated.
Processes are a series of steps that run on the server and require intervention by a human.
Automations are bots that run automatically on a desktop or virtual machine, and require the installation of an agent on that machine.
-
- Step 5
Every process needs a trigger to start a new instance of the process.
-
Click Add a Trigger.

-
Select Wait for an Event.

-
In the list of published events, find the BusinessPartner Created event (from the EDP CodeJam project).
Click Add next to it.

For the event details, including name, keep all the defaults. Click Create.

-
Click Save (upper right).
You can now see the trigger at the start of the process. The process is ready to be triggered by our event.

A process can be triggered in one of the following ways:

Submit a Form: You can provide users a link to a form, which they can fill out and submit. For example, to order equipment or to create sales orders from an Excel file.
API Trigger: You can specify that you want other applications to be able trigger the process via an API Call.
Wait for an Event: You can specify that the process starts whenever we receive a specific event. That is what we will use.
Scheduled Trigger: The process is automatically triggered at the times you specify.
-
- Step 6
For the process to be active, you must create a release version and then deploy it.
-
Click Release.

In the dialog, you can add some release notes if you want.
Click Release.

-
Note that you are still inside the editable project, not the released version you just created. But we want to deploy the released version.
Click Show project version (upper left).

This will take you to the released version of your project, so you can deploy it.
You can navigate between the versions of your project at the very top using the dropdown (assuming there is more than one version).

-
Click Deploy.

Select the Public environment.
Select Deploy.

Environments lets you deploy different projects to different areas that have different resources and permissions.
For example, you can have environments for different lines of business, allowing specific people to create and deploy projects. And each environment can include different destinations to different backend systems.
-
When deploying, you will be made aware of the triggers that will be created, modified or deleted because of your deployment. Triggers are separate artifacts that can be configured within an environment.
You can just click Deploy.

The status of the project will change to Deployed, with a marker that says the project is Active

-
- Step 7
Now we want to trigger the process.
But for this tutorial, we are going to do it manually from within the administration tools, without creating a business partner nor generating an event to trigger the process. Using a real event to trigger the process will wait until the next tutorial.
-
On the main SAP Build page, select Control Tower.
You should have a browser tab open to the main SAP Build page. If not, click on the SAP logo.

-
Click the Environments tile.

Select the Public environment.

-
Click Process and Workflows.
The button may be hidden under the More dropdown.

-
In the list of process definitions, select Badge Process.

For when you have lots of processes, you can filter the list by project, from the dropdown.
-
On the right, click Start New Instance.
This displays a dialog for provided the required payload for the trigger.

IMPORTANT: In the dialog, you must provide the values for the inputs that you defined as “process inputs” in JSON format (those fields in the trigger event). BUT … the example JSON you will see in the dialog is not related AT ALL to what you need to provide. Therefore, you will delete this JSON.
In the dialog, replace the JSON with the following JSON.
JSONCopy{ "id": "33642f82-f55d-4d03-a198-2f2b9e135902", "time": "2025-01-31T06:12:26.851Z", "type": "cust.ext.codejam.ZBUSINESSPARTNER.Created.v1", "source": "/default/sap.s4.beh/244572008", "specversion": "1.1", "datacontenttype": "application/json", "data": { "BusinessPartner": "1005773", "FirstName": "Alan", "LastName": "Turing", "YY1_SAPCommunityDisplayName": "[SAPCommunityDisplayName]" }, "sapcommunitydispname": "[SAPCommunityDisplayName]" }If you want, change the community ID to yours. But for this test, you do not have to.

Click Start New Instance.
If all goes well, you should see Instance started at the bottom.

We have now simulated an event within SAP Build Process Automation in order to start and test the process more easily.
-
- Step 8
Once we start a process, we have created a process instance, and we want to see who started it, when it was started, which steps have been executed, and more information about the instance.
-
In SAP Build, click Monitoring.

-
Click the Processes and Workflow Instances tile.

-
Since the filter hides Completed or Canceled process instances, your process will not be visible – since we created a blank process, our process instance completed immediately.
In the Status filter, add Completed.

You should now see your process instance.

-
Click on the process instance to see its details.

The information is divided into three parts:
Field Value Header At the top you will be things like when the process started, its ID, its environment, its current status and more. Logs Here you will see what steps were started and stopped, as well as some details about each step. For example, you will see an entry for the trigger and to indicate the instance completed. In other types of steps you will get additional information, like who was sent an approval form, the ID of the form, or error details.Context Here you will see the data that is contained in the process instance, such as the input values sent with the trigger, custom variable values, data returned by an action, and more.
-
- Step 9
Things to Ponder
What capabilities does an environment let you control?
Open the Overview tab of your process. What types of artifacts can you add to the project and what would they be useful for?
What types of triggers are there, and when do you think you would use each?