Saturday, February 23, 2019

Azure Logic Apps + Microsoft Flow

workflow cloud platforms

Logic App Service | Microsoft Azure

What are Microsoft Flow, Logic Apps, Functions, and WebJobs? - Azure | Microsoft Docs

"Microsoft Flow and Logic Apps are both designer-first integration services that can create workflows. Both services integrate with various SaaS and enterprise applications.
Microsoft Flow is built on top of Logic Apps. They share the same workflow designer and the same connectors."

"Functions and Logic Apps are Azure services that enable serverless workloads. Azure Functions is a serverless compute service, whereas Azure Logic Apps provides serverless workflows. Both can create complex orchestrations. An orchestration is a collection of functions or steps, called actions in Logic Apps, that are executed to accomplish a complex task. For example, to process a batch of orders, you might execute many instances of a function in parallel, wait for all instances to finish, and then execute a function that computes a result on the aggregate."
Azure Logic Apps Documentation - Tutorials, API Reference | Microsoft Docs

"Azure Logic Apps is a cloud service that helps you automate and orchestrate tasks, business processes, and workflows when you need to integrate apps, data, systems, and services across enterprises or organizations. Logic Apps simplifies how you design and build scalable solutions for app integration, data integration, system integration, enterprise application integration (EAI), and business-to-business (B2B) communication, whether in the cloud, on premises, or both.

To build enterprise integration solutions with Azure Logic Apps, you can choose from a growing gallery with 200+ connectors, which include services such as Azure Service Bus, Functions, and Storage; SQL, Office 365, Dynamics, Salesforce, BizTalk, SAP, Oracle DB, file shares, and more. Connectors provide triggers, actions, or both for creating logic apps that securely access and process data in real time."
Logic Apps Designer - example logic app

"Every logic app workflow starts with a trigger, which fires when a specific event happens, or when new available data meets specific criteria. Many triggers include basic scheduling capabilities so that you can specify how regularly your workloads run. For more custom scheduling scenarios, start your workflows with the Schedule trigger. Learn more about how to build schedule-based workflows.

Each time that the trigger fires, the Logic Apps engine creates a logic app instance that runs the actions in the workflow. These actions can also include data conversions and flow controls, such as conditional statements, switch statements, loops, and branching."

Quickstart - Create and automate your first workflow - Azure Logic Apps | Microsoft Docs

Select trigger: "RSS - When a feed item is published"

Set up trigger with RSS feed, frequency, and interval

Select this action: "Office 365 Outlook - Send an email"

Add contents for email body

Enterprise integration with Azure Logic Apps | Microsoft Docs

Microsoft/vscode-azurelogicapps: Azure Logic Apps extension for VS Code @ GitHub

for low code / no code apps:

Automate processes + tasks | Microsoft Flow

"Turn repetitive tasks into multistep workflows. For example, with a few clicks capture tweets and add them as leads in Dynamics 365, subscribers in Mailchimp, and more...
Start with a template..."
A multistep workflow that adds a record to Dynamics365 and MailChimp when a user with more than 100 followers posts a tweet.

"Microsoft Azure LogicApps Components:
  • Workflow – is used to define the different steps of your business process, using a graphical user interface.
  • Triggers - initiate a workflow, and create a new instance of the workflow. A trigger can be an arrival of a file on FTP site or receiving an email. Types of triggers:
    • Poll triggers: These triggers poll your service at a specified frequency to check for new data. When new data is available, a new instance of your logicapp runs with the data as input.
    • Push triggers: (Webhooks) These triggers listen for data on an endpoint, or for an event to happen, then triggers a new instance of your logicapp.
    • Recurrence trigger: This trigger instantiates an instance of your logicapp on a prescribed schedule.
    • Event-based triggers: i.e. message from service bus queue
  • Actions - An action represents a step in the workflow.
    It can invoke an operation on your API.
  • Connectors - are used to connect to different data sources and services.
    Azure LogicApps provide an in-built set of managed connectors that cover different areas like social media, file FTP and many more.
    • Enterprise Integration Pack (EIP) Connectors - provide functionality like BizTalk.
      These connectors are used for complex enterprise integration scenarios such as XML messaging and Validation. It supports exchange messages through industry-standard protocols, including AS2, X12, and EDIFACT. It requires an "Integration Accounts" to store different artifacts, like schemas, partners, certificates, maps and agreements

Online training classes:

Azure Logic Apps: Getting Started | Pluralsight

Azure Logic Apps: Getting Started : Building Blocks

  • "Connectors" are pre-built wrappers around systems (web service APIs); there are about 200 built-in connects, and you can build your own (that is just an API)
  • "Triggers": to initiate a Logic App; could be "reactive" and "proactive" (see above list); could leverage "trigger templates" and "pre-built templates"; Not all connectors could be triggers
  • "Actions": building blocks of Logic Apps; most of Actions are also Connectors.
    Actions is just "next step" in a logic app. 
  • "Flow Control": sequence of logic in Logic App
    • "if-then", "switch", "for-each", "do-until", "scope"

Microsoft Azure Developer: Creating Enterprise Logic Apps | Pluralsight

Azure Logic Apps: Fundamentals | Pluralsight













Data operation samples - Azure Logic Apps | Microsoft Docs



"actions": {
   "Initialize_variable_-_integer_array": {
      "type": "InitializeVariable",
      "inputs": {
         "variables": [ 
            {
               "name": "myIntegerArray",
               "type": "Array",
               "value": [
                  1,
                  2,
                  3,
                  4
               ]
            }
         ]
      },
      "runAfter": {}
   },
   "Select": {
      "type": "Select",
      "inputs": {
         "from": "@variables('myIntegerArray')",
         "select": {
            "Product_ID": "@item()"
         }
      },
      "runAfter": {
         "Initialize_variable_-_integer_array": [
           "Succeeded"
         ]
      }
   }
},

Schedule and run automated tasks and workflows with Azure Logic Apps | Microsoft Docs
"triggers": {
   "Recurrence": {
      "type": "Recurrence",
      "recurrence": {
         "frequency": "Week",
         "interval": 1,
         "schedule": {
            "hours": [
               10,
               12,
               14
            ],
            "minutes": [
               30
            ],
            "weekDays": [
               "Monday"
            ]
         },
         "startTime": "2017-09-07T14:00:00",
         "timeZone": "Pacific Standard Time"
      }
   }
}
azure-quickstart-templates/101-function-app-create-dynamic at master · Azure/azure-quickstart-templates @ GitHub


No comments: