Using Flow to let users drive an integration Scenario
  • 22 Mar 2019
  • 3 Minutes to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Using Flow to let users drive an integration Scenario

  • Comment
  • Dark
    Light
  • PDF

Article Summary

Recently I was working on an integration scenario which I thought demonstrates some of the modern integration technology advantages which simplify the scenario of bringing the user into the process.

If we consider the following example which I have discussed before we have a system of record implemented in an instance of Dynamics CRM which we have used for a few years and we wanted to compliment it with a single use case but we want to use a system of engagement to extend the scenario with a Microsoft Power App. The Power App will capture data in a simple set of forms and when this data is captured a Logic App will synchronise the transaction to CRM and kick off a bunch of background processes to process the records. The below picture illustrates this.

image.png

Once we have the data entry app running we do need some reference data to make the user exeperience nicer.

Automating the Reference Data Synchronization

To synchronize some reference data between the CRM instance and the Power App we choose to use Azure Data Factory to implement a simple synchronization process like in the below diagram.

image.png

We were able to schedule this to run on a regular basis to sync things like a list of countries and partner companies.

The one problem we found was that sometimes the business users would add a bulk of new partners to CRM and the nightly delay was a bit of a pain for the data being slightly out of sync. It wasnt a massive problem but we looked into some options to do something about it.

Empowering the user with Flow

The next step was to create a way to allow the business user to trigger the sync process on demand if they have made a lot of changes to the data.
To achieve this I created a Logic App next to my Data Factory which would be able to be triggered over HTTP which would then be able to make the Data Factory Pipeline run.

I then used a Microsoft Flow with the input trigger of a Flow Button press which would trigger the flow and it would then call the Logic App which would then trigger the Data Factory. The below picture shows this representation.

image.png

  1. The user will open the Flow Mobile app
  2. The user will click the button to trigger the flow
  3. The flow will then trigger the Logic App
  4. The logic app will trigger the Data Factory pipeline which will sync the data

I was able to add the user to the team which my Flow belongs to and then the user is able to trigger the Flow easily from the Flow Mobile app.

Design Considerations

There are a few interesting design considerations in this process.

Why use the Logic App

If you are familiar with Flow you might ask why I didnt just call the Data Factory pipeline straight from Flow. While it would have been simpler the key thing is that I wanted to allow the super user to have access to execute the function but to not have access to a lot of other stuff. To allow the user to execute the Flow then I add the user to the team that owns the Flow. This will however give themsme sensitive bits of info such as being able to edit the flow and access other things that may have configured. In this case however i put the sensitive bit that connects to Data Factory inside a Logic App. The user cam edit a Flow but cam not access the bits


Was this article helpful?