Triggers Properties and Sample Code
In the triggers
sections of the adapter definition
document, you define the actions or events that can start an integration.
Overview
A trigger is the action or event that starts an integration. For example, a state change or an event occurrence in an application can kick off an integration.
An integration developer configures the trigger for an integration when creating a connection. The trigger sends requests from the application you're developing an adapter for to Oracle Integration.
The adapter definition document must define all the actions or events that can be triggers. The source or event producer applications calls the registered webhook endpoints. These webhook endpoints are the triggers modeled by the integration developers.
The Rapid Adapter Builder platform supports HTTP protocol to receive events. The definition of a trigger allows the adapter developer to design:
-
Inbound message structure
-
Security scheme for message ingress and validation
-
Mechanism to create and delete a subscription of the external application
Properties
For each trigger, you must specify the required information, such as the element to use for the request and response and how to process the data. The element to use for the request could be a business object, operation, or another element. The following information is required:
Property | Description |
---|---|
|
Name of the trigger that appears on the user interface when a integration developer configures the endpoint in Oracle Integration. |
|
Tooltip for the trigger that appears on the user interface when a integration developer configures the endpoint in Oracle Integration. |
|
Type of trigger. Notification signifies that the external source notifies Oracle Integration of the message but does not require a response. RequestResponse is a cause where the external source expects a response from the request. |
|
Name of the group that is defined in the groups section of the adapter definition document. |
|
Uniform resource name (URN) that references the flow that implements the trigger. The flows are defined in the flows section of the adapter definition document. |
|
Methodology to receive a message from the external source. For example, webhooks use a POST method with a body. |
|
The schema for an incoming message of this trigger. The request
contains The The The request can refer a flow in the Example code:
|
|
Third party notification message structure and includies headers, parameters,and body. |
|
Set of HTTP header parameters that are defined by name and type. |
|
Set of query parameters defined by name and type, and models the parameters from the webhook request to trigger. |
body |
HTTP body including schema type and schema. This is similar to the request section. |
subscription |
Models the ability of the trigger to programmatically subscribe to an event if the external source supports an API that support subscription. The activation section models the subscription during activation and the delete of a subscription during the deactivation of an integration. This section consists of filter, register and deregister properties. |
filter |
Enables event filtering at server through registration, or at the client through condition. This property can also filter ping events, and specify response status for client and response filters. |
register |
References a flow that executes an API call on the external service to programmatically register to an event. |
|
References a flow that executes an API call on the external service to programmatically deregister to an event. |
|
Identifies validation requests and allows override response behavior for such requests. Validation requests cannot execute integration flows. This property consists of condition, skipAuthentication and response.condition, jq expression on an incoming request object. It returns either true or false. If true, the validation request is ignored. The output must be a JSON object that represents response status, headers and body. |
|
Models the configuration option required to configure the trigger. Some triggers may require additional information that users must provide to allow runtime to function. The configuration properties are modeled as user interface widgets with data that is statically defined and fed by flows. |
Sample Code
"triggers": {
"notificationTypeTrigger": {
"displayName": "Notification Type Trigger",
"description": "This trigger detects when an event has been raised.",
"group": "simpleTrigger",
"type": "webhook",
"httpMethod": "POST",
"request": {
"schemaType": "application/json",
"schema": {
"$ref": "#/schemas/staticInput"
}
},
"webhook": {
"headers": [
{
"name": "http-header-1",
"type": "string"
}
],
"parameters": [
{
"name": "query-parameter-1",
"type": "string"
}
],
"body": {
"schemaType": "application/json",
"schema": {
"$ref": "#/schemas/staticInput"
}
}
}
}