Microsoft Azure - Logic Apps

Logic Apps are one of the compute solutions offered by Microsoft Azure. Logic Apps are design first workflows hosted in Azure in a serverless mode and implemented through underlying Azure Service Fabric. They have a visual design to connect your applications, components, services and APIs together in a workflow which is triggered by some event. As Logic Apps are executed in a serverless mode, so you are charged for the consumption plan price which is pay per execution. Logic Apps are used to integrate systems hence they are also called integration service.

Components of Logic App

Logic Apps require following:

  • Trigger (Only One) of any supported types (HTTP or other triggers (check list of supported triggers on Microsoft website) to trigger the execution
  • Conditions/loops (outcome from triggers is checked against a condition or put in a loop) based on which different Actions are executed
  • Actions  are tasks which are performed based on condition result or as a result of triggering action. Actions can also be triggers for further actions


Connectors

Logic Apps are visual hence you need connectors for different triggers or applications to connect in the workflow. Connectors are like registered interfaces for logic apps to use in the flow. Different types of connectors are supported for logic apps. For details of these connectors, follow MS docs. Some of the popular/example/categories of connectors are below.

APIs (your own hosted on Azure)

Logic Apps

Functions

Microsoft Managed APIs (managed by Microsoft)

    • SharePoint
    • MS Exchange
    • SQL Server 
    • CRM
    • DropBox
    • FTP
    • github
    • Facebook etc


Marketplace/third party/Enterprise connectors 

        (needs to be deployed in Azure cloud as an API in the same region as of Logic App to connect with Logic App, so basically you will be paying for their hosting) examples are Oracle, IBM and other enterprise level connectors. Marketplace connectors are more sophisticated and enterprise level connectors 

Connectors can also be Actions and can trigger the next action. Here outlook email connector is acting as trigger for the next action which is create new list item in SharePoint connector and entry to SharePoint triggering another action in outlook connector.


Connector types

Connectors are available as:

  • built-in triggers 
  • actions 
  • managed connectors.

Built-in: Built-in triggers and actions run natively in Azure Logic Apps so they don't require creating a connection before you use them and help you perform these tasks for your logic apps.

Managed connectors: Deployed and managed by Microsoft, these connectors provide triggers and actions for accessing cloud services, on-premises systems, or both, including Office 365, Azure Blob Storage, SQL Server, Dynamics, Salesforce, SharePoint, and more. 

Managed connectors have triggers and actions that call other services and systems. These connectors are organized into subcategories. Managed API connectors have actions and triggers that integrate with Azure Blob Storage, Microsoft 365, Dynamics, Power BI, and more. On-premises connectors have actions and triggers that integrate with on-premise installations of SQL Server, SharePoint Server, Oracle, and file shares.

Connectors which support business-to-business (B2B) communication scenarios require an integration account that's linked to your logic app. Before using certain connectors, you might have to first create connections, which are managed by Azure Logic Apps.

Connectors are classified as either Standard or Enterprise. Enterprise connectors provide access to enterprise systems such as SAP, IBM MQ, and IBM 3270 for an additional cost. To determine whether a connector is Standard or Enterprise, see the technical details in each connector's reference page on Microsoft's Website.

👉Note: for existing APIs or system, you need to register them with Azure as a Logic App connector before you can use them in Logic Apps. You existing Azure APIs running in the same azure tenant are already visible to LA designer.

Logic Apps offers over 200 built-in connectors. They fall into various categories:

  • Built-in connectors have actions and triggers that integrate with Azure Apps and Functions.

  • Integration account connectors transform and validate XML, encode and decode flat files, and process business-to-business (B2B) messages with AS2, EDIFACT, and X12 protocols.
  • Enterprise connectors provide access to enterprise systems such as SAP, IBM Message Queue, etc.

Triggers

As mentioned above, Triggers are like events which trigger the execution of a Logic App. Every Logic App has one and only one trigger. Triggers can be scheduled or it can be external apps like MS office 365. 

Examples

Some examples are:

  • An order has been placed in the system and a order is added into the storage which triggers the execution of Logic app.
  • A user has posted a tweet in twitter.
  • As an example of multiple instances of LA, consider Outlook email trigger triggered multiple instances of Logic App in parallel as there were multiple instances of the same trigger.  The number of instances of logic app are dependent on the pricing tier of the logic app. The most popular triggers are HTTP based which are triggered by the browser. 

Types of Triggers

Based on the behaviour of a trigger,  there are two categories of Triggers:

Poll triggers -when logic app is polling for notification of when an event is fired.

Push Triggers -  Logic App is notified by trigger when an event is fired

Actions

 Action can receive the input from the previous step and execute. Actions are tasks which are performed based on condition result or as a result of triggering action. Connectors are used to perform required actions. 

Exercise:

For a step by step process of creating a basic Logic App, go to the post:

Lab:  Logic App in Azure Portal



Comments

Popular posts from this blog

How to prepare for AZ-204 Developing for Microsoft Azure Certification Exam

Data Annotations in ASP.NET Core