Define a Trigger with Webhook Transformation

The Rapid Adapter Builder developer can use triggers to host APIs that can receive webhook events.

This procedure gives an overview of how you can transform a webhook payload into a simplified format that is exposed in the Oracle Integration mapper.
Ensure to:
  • Define a schema representing trigger object to be presented to orchestration/Mapper
  • Define a schema representing actual webhook received by Oracle Integration.
  • Flow to transform exists in the adapter definition document. For more information on how to define a flow, see Create a Flow for invoking a POST API.
  1. Open the adapter definition document in Visual Studio Code Editor.
  2. In the triggers code section, define a pass-through trigger. For more information on how to define a pass-through trigger, refer .
  3. Add webhook with body referencing its schema.
  4. Refer to flow in execute.

    The following sample code shows how to refer to a flow in the execute:

    "triggers":{
       "pageChangeEvent": {
          "displayName": "Wiki Page Updated Event",
          "description": "This trigger detects when a Wiki Page Updated Event has been raised.",
          "type": "webhook",
          "httpMethod": "POST",
          "request": {
            "schemaType": "application/schema+json",
            "schema": {
              "$ref": "#/schemas/eventSchema"
            }
          },
          "execute": "flow:handleNotificationRequestFlow",
          "webhook": {
              "body": {
              "schemaType": "application/schema+json",
              "schema": {
                "$ref": "#/schemas/webhookSchema"
              }
            }
         }
        }
    }