Skip to Content

Test an API Trigger for a Business Process

Run API trigger for the Business Process.
You will learn
  • How to discover APIs in SAP API Business Hub
  • How to test APIs in SAP API Business Hub
  • How to test an API trigger of a business process
  • How to start the business process from other services
chaitanya-priya-puvvadaChaitanya Priya PuvvadaJanuary 27, 2023
Created by
January 25, 2023
  • Step 1

    Once you have successfully deployed the business process with an API trigger, you can view the API trigger in the Overview section under the tab Triggers.

    1. Click View to see context of the workflow API.


      Copy the payload which would be used in the later steps .

    2. You can view the API URL and the payload to start the process.

      Trigger Payload

      Details of the payload:

      Name Details
      definitionId ID of the process after it is deployed
      salesorderdetails Input parameter for the API trigger

    You can even get the process definitionId from the Monitor section as shown below.

    Workflow DefinitionID
    Log in to complete tutorial
  • Step 2

    All Process Automation APIs (except Inbox APIs which are OData v2 API) are REST APIs that are based on OAuth 2.0 and other methods like API keys.

    1. Login to SAP API Business Hub to explore them.

      API Business Hub
    2. To trigger the process with an API Trigger, click on Process and Workflow instances.

      Process and Workflow
    3. Click on View API Reference, and then navigate to Workflow Instances –> POST –> Try out.

      Try out API
    4. Let’s create a Demo Environment to test the API. Click Select Environment.

      Select Environment

      Map the credentials of the service key that you have created for SAP Build Process Automation as mentioned in prerequisites.

      Select Environment
      Client ID Client ID from the service key credentials
      Client Secret Client secret from the service key credentials
      Token Service URLurl/oauth/token, where url is noted from the service key credentials
    5. After successful creation of demo environment, the token for the API call would be added to the header section.

      Try out API
    Log in to complete tutorial
  • Step 3
    1. Copy the payload that you copied in Step 1 of section View an API trigger for the process and paste it as shown below.

      Copy Payload

      Add values for the input fields. The payload looks as below before execution of the API. Click Run to trigger the API, which would start your process.

    2. You can see the status code of the API as 201, which is Success, meaning the process was triggered.

    Log in to complete tutorial
  • Step 4

    In the home page of SAP Build Process Automation tenant, navigate to Monitor > Process and Workflow instances to view the running instance of your process that was triggered from API call.

    Log in to complete tutorial
Back to top