Top Banner
Azure Logic Apps Josh Lane Azure Content Lead – Cloud Academy Ian Philpot Senior Developer Evangelist – Microsoft
29

Workflow All the Things with Azure Logic Apps

Jan 24, 2018

Download

Software

Josh Lane
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Workflow All the Things with Azure Logic Apps

Azure Logic Apps

Josh Lane

Azure Content Lead – Cloud Academy

Ian Philpot

Senior Developer Evangelist – Microsoft

Page 2: Workflow All the Things with Azure Logic Apps
Page 3: Workflow All the Things with Azure Logic Apps

What the what?

• Integration PaaS

• Declarative, trigger-based workflows

• Hosted in Azure

• JSON-based

• Pay per workflow step executed• Starts at $0.0008/step

Page 4: Workflow All the Things with Azure Logic Apps
Page 5: Workflow All the Things with Azure Logic Apps

Logic Apps

Connect Anything

Agile Business

Transform Business

Page 6: Workflow All the Things with Azure Logic Apps

Cloud APIs and platform functionality

API connections

Managed connectors

Page 7: Workflow All the Things with Azure Logic Apps

Protocols/Native

XML & EDI

Hybrid

Spectrum of connectors

SaaS

Page 8: Workflow All the Things with Azure Logic Apps

Protocols/Native

XML & EDI

Hybrid

Spectrum of connectors

SaaS

• Azure API Management

• Azure App Services

• Azure Cognitive Face API

• Azure Cognitive LUIS

• Azure Cognitive Text Analytics

• Azure Document DB

• Azure Functions

• Azure Machine Learning

• Azure Resource Manager

• Azure Service Bus

• Azure SQL

• Azure Storage Blob

• Azure Storage Queues

Page 9: Workflow All the Things with Azure Logic Apps

Protocols/Native

XML & EDI

Hybrid• BizTalk Server

• SharePoint Server

• SQL Server

Spectrum of connectors

SaaS

• Bing Search

• Dynamics AX Online

• Dynamics CRM Online

• Dynamics CRM Service Bus

• Dynamics Financials

• Dynamics Operations

• Microsoft Project Online

• Microsoft Translator

• MSN Weather

• Office 365

• Office 365 Users

• Office 365 Video

• OneDrive

• OneDrive for Business

• OneNote

• Outlook.com

• Outlook Tasks

• Power BI

• Project Online

• SharePoint Online

• VS Team Services

• Wunderlist

• Yammer

Page 10: Workflow All the Things with Azure Logic Apps
Page 11: Workflow All the Things with Azure Logic Apps

Workflow in the cloud

Powerful control flow

Connect disparate applications

No code designer for rapid creation

Page 12: Workflow All the Things with Azure Logic Apps

Templates

Page 13: Workflow All the Things with Azure Logic Apps

Debugging and History

Trigger history / Run history

Monitoring view

Diagnostics & Alerts

Call Logic App on new Alert

Azure

Page 14: Workflow All the Things with Azure Logic Apps

•Hosted Logic Apps designer

• Persist using deployment templates

• Source Control & CI/CD

•Cloud Explorer extension

• Integration Account configurability

•Develop XML collateral• XSLT Mapper

• XML schemas

• Flat file schemas

Logic Apps tools for Visual Studio

Page 15: Workflow All the Things with Azure Logic Apps

Workflow Constructs

Page 16: Workflow All the Things with Azure Logic Apps

Triggers

Creates new instances of Logic Apps

• Runs based on a defined schedule.Recurrence

• Serves as an endpoint that you call via an HTTP Request.Request

• Poll a specified endpoint and check the response in order.HTTP

• APIConnection is a polling trigger that calls Managed connectors.APIConnection

• Calls out to a specified URL to register and unregister.HTTPWebhook

• Is a webhook trigger that subscribes to a webhook from a managed connector.

ApiConnection

Webhook

•Debatch an array into separate instances.Split

• Allow only one instance of a Logic App to run at a timeSingleton

Page 17: Workflow All the Things with Azure Logic Apps

Actions

Invoke other services

Managed Connectors

App Service APIs

API Management

Azure Functions

Workflow

HTTP + Swagger

HTTP

Page 18: Workflow All the Things with Azure Logic Apps

Actions

Control

behaviour

Retry Policy

Run After

Response

Webhook

Wait

Terminate

Page 19: Workflow All the Things with Azure Logic Apps

Actions

Message

Handling

Compose

Query

Request schema

Parse JSON

Xpath

XSLT

XML validation

Page 20: Workflow All the Things with Azure Logic Apps

Actions

Collections

• Encapsulates a set of actions.

• Can be used for error handling and compensation.

Scope

• If…Else conditions

• Can be nestedCondition

• Determines which path to take based on

values in case statementsSwitch Case

• Iterate over a list of items.ForEach

• Loop until a condition is met.

• Exit criteria can be time or condition.Until

Page 21: Workflow All the Things with Azure Logic Apps

Expressions

Built-in functions

• Concat; Substring; Replace; Guid; toLower; toUpperString

• Equals; Less; lessOrEquals; lessOrEquals; greaterOrEquals; And; Or; Not; IfLogical

• Int; String; Json; Float; Bool; Coalesce; Base64; Xml; XPath; EtcConversions

• Add; Sub; Mul; Div; Min; Max; Range; RandMath

• Utcnow; Addseconds; Addminutes; Addhours; Adddays; FormatDateTimeDate

• Contains; Length; Empty; Intersection; First; Last; Take; SkipCollection

• Parameters; Action; Actions; Triggers; ActionsOutput; ActionBody; Item; EtcReferencing

Page 22: Workflow All the Things with Azure Logic Apps

Expressions

Operators

• Invoke an expression function@

• Parameters for an expression()

• Array reference

• Property reference[]

• String interpolation{}

• Property reference.

• Null safe dereference?

Page 23: Workflow All the Things with Azure Logic Apps
Page 24: Workflow All the Things with Azure Logic Apps

Patterns

Page 25: Workflow All the Things with Azure Logic Apps

Workflow Patterns

• Use Service Bus to send the metadata

• Use Blob Storage to store the messages

• Include only the necessary metadata in the queue for routing

• Put related actions into a “try” scope

runafter try-scope Failed

• Add error handling actions into “finally” scope with a terminate action

• Use transport that provides ordered delivery (e.g. Service Bus queues)

• Use Singleton workflows

• Remove parallelism from foreach

Page 26: Workflow All the Things with Azure Logic Apps

In-Order Processing

mytrigger

type ApiConnection

inputs

recurrence

operationOptions singleInstance

forEach_item

type foreach

foreach @body('action1')

actions

operationOptions sequential

runAfter

Page 27: Workflow All the Things with Azure Logic Apps

Scalability

• Trigger uses long polling

• For immediate firing *minimum* polling interval should be 30 seconds

• Throttled at 2000 actions/min

• Use multiple Logic Apps sharing connection

• Use multiple connections

• Each Trigger can receive multiple messages in ‘batch’

Page 28: Workflow All the Things with Azure Logic Apps

Best Practices

• Allows for reuse

• Resubmit at appropriate granularity

• Increased parallelizability

• Check to see if there’s a built-in function

• Fall back to an Azure Function

• Request triggers are operations on an API

• Allows for vanity names, heterogenous APIs, telemetry, load balancing

• Consistent management of all API endpoints

• Works across VNETS

Page 29: Workflow All the Things with Azure Logic Apps

Thanks!