FME Version
FME Flow Automations integrates with Microsoft Azure through Azure’s Event Grid service. Much like “Notifications” in FME Flow, Event Grid provides a notification model for passing JSON messages among apps and services.
In this exercise, we will build an Automation that runs a workspace and notifies the event grid when it's complete. We will also describe how to set it up and ensure a connection between FME and Azure event grid.
Prerequisites
- Access to Azure Event grid on Azure portal
- Access to FME Flow
- Knowledge of automations in FME
Step-by-step Instructions
Part 1: Set up Event Grid in Microsoft Azure
The Event grid should be created and configured to receive the notifications from FME. This part of the process needs to be completed in Azure.
1. Navigate to Microsoft Azure to Create the Event Grid
Log into Microsoft Azure. In the search bar, type Event Grid. You will see a menu similar to the screenshot below.
2. Create a Topic
Navigate to topics and click “Create”.
Configure the parameters based on your unique scenario. Once created, your topic should have a reachable endpoint, as shown below.
You should also note the access key as this will be required when filling up the external action in FME
The main information to note from Azure
- The Topic endpoint
- The access key (This is the Event Grid Topic key and can be found in the settings tab of the Event Grid Topic)
Part 2: Create Automation in FME Flow
1. Add a Manual Trigger to an FME Automation
Log in to FME Flow in another browser tab. Then navigate to Automations and create a new automation. On the automation canvas, add a Manual Trigger, then connect an Action. For the Action, choose “Run a Workspace”. For this example, select the Samples repository, then select AverageRunningTime.fmw as the Workspace.
2. Setup Azure Event Grid Topic in the Created External Action
Add an External Action, and connect it to the Success port on the Run Workspace Action. In the External Action parameters, choose the “Azure Event Grid Topic(Notify) option, then input your Endpoint and Topic Key from Part 1.
Next, for Subject click the drop-down arrow, expand General and then select Automation ID. Repeat this for Event Type, then click Apply.
3. Start the Automation
Save and then Start the automation. Next, click Trigger next to the Stop automation button to trigger the automation. After triggering, check that the event is running correctly by navigating to “Resources > logs > Automations > Current > action_eventgrid.log.
You should see a log similar to the one below.
Part 3: Create an Azure Event Grid Event Trigger in FME (Optional)
1. Create an Azure Event Grid Trigger in FME
In the same Azure Event Grid automation, add a new Trigger and set it to Azure Event Grid Event(received). Copy the Webhook Endpoint, it will be used in Microsoft Azure. Click Apply, then Save and Start the automation.
Part 4: Create an Azure Event Grid Event trigger in FME (Optional)
1. Create an Event Subscription
Navigate back to Microsoft Azure, and select the previously created Event Grid. Find the section to create an Event Subscription and then click the Create one button. Y
2. Fill the Information Required in the Form
Add an Event Name, then for Endpoint Details select Webhook. For the Endpoint, click on Configure an endpoint, then paste in the copied Webhook Endpoint from the FME Automation. Save the Event Subscription.
3. Confirm the Notification
Return to the Event Grid Subscriber section and you can see the notifications through the metrics section of the Event Grid page as shown below.
Comments
0 comments
Please sign in to leave a comment.