Define a Pass-through Trigger

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 define a simple trigger in the adapter definition document. After a trigger is created, you have to manually register with the target application.

Prerequisite:

Define a schema representing the trigger object. This schema is provided to the Oracle Integration orchestration or mapper.

  1. Open the adapter definition document in Visual Studio Code Editor.
  2. Navigate to the triggers code section and create a skeleton trigger code.
  3. Set the property of the trigger to webhook.
  4. Specify the request method.
  5. Specify the request schema.

    Sample code:

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