Use the Azure Event Grid Adapter to Receive Notifications When a New File is Created in Azure Storage

The Azure Event Grid Adapter supports receiving event notifications from the Azure Event Grid messaging system in Oracle Integration.

This use case describes how the Azure Event Grid Adapter is used to subscribe to and receive event notifications in Oracle Integration when a new file is created in Azure Storage. This implementation pattern provides an overview of the steps.

Configure an Azure Event Grid Trigger Endpoint and Select a System Topic and Filter Event Type to Receive the Event Notifications

  1. Configure the Azure Event Grid Adapter on the Connections page. See Create a Connection.
  2. Create an application integration. This is the first of two integrations you create.
  3. Add the Azure Event Grid Adapter as a trigger connection in the integration.

    The Adapter Endpoint Configuration Wizard is displayed.

  4. Configure the Azure Event Grid endpoint:
    1. On the Basic Info page, provide the endpoint name.
    2. Select the Subscribe to a System Topic operation and select Subscribe to a System Topic with Event Grid Schema.
    3. On the Configuration page, the following details are specified or selected for this use case:
      1. Select AzureEGSysTopic in the Select a System Topic field.
      2. Select EventGridSchema for the Event Schema for Subscription field.
      3. Select Microsoft.Storage.StorageAccounts for the Topic Type field.
      4. Select Blob Created and Blob Deleted under Filter Event types.
      5. Enter the JSON request payload for the data field.
    4. Review your selections on the Summary page.
  5. Specify the business identifier tracking variable and activate the integration.
  6. Once you activate the integration, the subscription gets created under System Topic.

Configure an Azure Storage Invoke Endpoint to Upload a Blob (file) to the Azure Portal Using the Put Blob (file) Operation in Azure Storage

  1. Create REST Adapter and Azure Storage Adapter connections.
  2. Create an application integration. This is the second of two integrations that you create.
  3. Drag the REST Adapter connection into the integration as a trigger connection.
  4. Specify the following details in the Adapter Endpoint Configuration Wizard.
    1. On the Basic Info page, provide the endpoint name.
    2. On the Resource Configuration page, the following details are specified or selected for this use case:
      1. Provide the endpoint’s relative resource URI (for example, /test).
      2. Select the PUT action.
      3. Select the Configure a request payload for this endpoint check box.
      4. Select the Configure this endpoint to receive the response check box.
      5. Select the Custom check box under Configure Request Headers.
    3. On the Request page, select Binary in the Select the request payload format field.
    4. On the Request Headers page, add the following custom HTTP headers:
      • version
      • blob
      • container
    5. On the Response page, select JSON Sample in the Select the response payload format field.
    6. Click inline and enter a valid JSON payload.
    7. Review your selections on the Summary page.
  5. Drag the Azure Storage Adapter into the integration as an invoke connection.
  6. Configure the Azure Storage Adapter endpoint:
    1. On the Basic info page, provide the endpoint name.
    2. Select Blobs in the Select Resource field and select the Put Blob (file) action.
    3. On the Configuration page, enter the container name and blob name.
    4. Review your selections on the Summary page.
  7. In the mapper, map the Custom HTTP Headers and Stream Reference elements from the REST Adapter to the equivalent fields in Azure Storage. Map the required response fields.


    The Sources, Mapping canvas, and Target sections are shown. The Custom HTTP Headers elements and Stream Reference element are mapped to the source Azure Storage elements.

  8. Click X Ms Blob Type. The Expression Builder is displayed.
  9. Add a value. For this example, the following value is added to the Expression Builder:
    BlockBlob
  10. Click Content Type. The Expression Builder is displayed.
  11. Add a value. For this example, the following value is added to the Expression Builder:
     application/octet-stream
  12. Click Validate, and activate the integration.

    The completed integration looks as follows.


    The trigger, map, invoke, and map are shown.

  13. During runtime, provide the valid values for the container, blob and version headers in the Request Headers section.
  14. Select the File radio button and choose the required file (blob) that you want to upload.
  15. Click Run.
  16. As a result, the selected file (blob) is uploaded to the designated container and the Azure Event Grid subscription triggers an event. This event subsequently generates a notification sent from Azure Storage to the Azure Event Grid integration in Oracle Integration.