Presentation is loading. Please wait.

Presentation is loading. Please wait.

T Sponsors Stephen Siciliano Senior Program Manager, Microsoft Inside Logic Apps BizTalk Summit 2015 – London ExCeL London | April 13th & 14th.

Similar presentations


Presentation on theme: "T Sponsors Stephen Siciliano Senior Program Manager, Microsoft Inside Logic Apps BizTalk Summit 2015 – London ExCeL London | April 13th & 14th."— Presentation transcript:

1 t Sponsors Stephen Siciliano Senior Program Manager, Microsoft Inside Logic Apps BizTalk Summit 2015 – London ExCeL London | April 13th & 14th

2 Agenda Introduction Background Basic scenario – WebHook initiated Logic App Taking it to the next level Repeats Conditionals Parameters

3 API APPS Easily build and consume APIs in the cloud WEB APPS Web apps that scale with your business LOGIC APPS Automate business process across SaaS and on- premises MOBILE APPS Build Mobile apps for any device App Service

4 LOGIC APPS Automate business process across SaaS and on- premises

5

6

7

8 Background

9 Azure Resource Manager The Azure Resource manager is a highly-scalable geo-distributed system that handles millions of resources across 100,000’s of subscriptions.

10

11 Same underlying engine… RESOURCE MANAGER Can handle thousands of parallel deployments per stamp Resilient against failure – retries with “at least once” guarantee Simple, declarative JSON template Automatically infers dependences between resources LOGIC APPS Can handle thousands of parallel runs per stamp Resilient against failure – retries with “at least once” guarantee Simple, declarative JSON definition Automatically infers dependences between actions

12 { "$schema": "http://schema.management.azure.com/schemas/2014-04-01- preview/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "variables": { "myWorkerSize": 0 }, "parameters": { "siteName": { "type": "string" }, "hostingPlanName": { "type": "string" }, "siteLocation": { "type": "string" }, "sku": { "type": "string", "allowedValues": [ "Free", "Shared", "Basic", "Standard" ], "defaultValue": "Free" }, "workerSize": { "type": "string", "allowedValues": [ "0", "1", "2" ], "defaultValue": "0" } }, "resources": [ { "name": "myplan1", "type": "Microsoft.Web/serverfarms", "apiVersion": "2014-04-01-preview", "location": "West US", "tags": { "dept": "test" }, "properties": { "Name": "myplan1", "sku": "Free", "workerSize": "[variables('myWorkerSize')]", "numberOfWorkers": 1 } }, { "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", "apiVersion": "2014-04-01-preview", "location": "[parameters('siteLocation')]", "tags": { "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource" }, "dependsOn": [ "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" ], "properties": { "name": "[parameters('siteName')]", "serverFarm": "[parameters('hostingPlanName')]" }, "resources": [ { "name": "MSDeploy", "type": "Extensions", "apiVersion": "2014-04-01-preview", "dependsOn": [ "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" ], "properties": { "packageUri": "https://auxmktplceprod.blob.core.windows.net/packages/ASPNETEmptySite.zip", "dbType": "None", "connectionString": "", "setParameters": { "Application Path": "[parameters('siteName')]" } } } ] } { "$schema": "http://schema.management.azure.com/providers/Microsoft.Logic/schemas/2014-12-01- preview/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": { "keyword": { "defaultValue": "logicapps", "type": "string" } }, "triggers": { "twitterconnector": { "recurrence": { "frequency": "Hour", "interval": 1 }, "type": "ApiApp", "inputs": { "apiVersion": "2015-01-14", "host": { "id": "/subscriptions/423db32d-4f58-4220-961c- b59f14c962f1/resourcegroups/bpmdemo003/providers/Microsoft.AppService/apiapps/twitte rconnector", "gateway": "https://bpmdemo003423db32d4f584220961cb59f14c962f1.azurewebsites.net" }, "operation": "TriggerOnNewTweet", "parameters": { "triggerId": "@workflow().name", "parameters": { "callbackUrl": "@accessKeys('default').primary.secretRunUri", "inputs": { "Keywords": "@parameters('keyword')" } }, "authentication": { "type": "Raw", "scheme": "Zumo", "parameter": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtc25hbWUiOiJFTUEuUmVzb3VyY2VQcm92aWRlciIsIm Z1bGxyb3ciOiJhbGwiLCJ2ZXIiOiIzIiwidWlkIjoic2lkOjE0Mjc0NzcwNjcxNDAiLCJpc3MiOiJ1cm46bW ljcm9zb2Z0OndpbmRvd3MtYXp1cmU6enVtbyIsImF1ZCI6InVybjptaWNyb3NvZnQ6d2luZG93cy1henVyZT p6dW1vIiwibmJmIjoxNDI3NDc3MDY5fQ.ihuWiXgyOpsG64Du6sAnRXxZGM_wtrJF0CJH0y-Rxfs" } }, "conditions": [ { "expression": "@bool('false')" } ] } }, "actions": { "dropboxconnector": { "type": "ApiApp", "inputs": { "apiVersion": "2015-01-14", "host": { "id": "/subscriptions/423db32d-4f58-4220-961c- b59f14c962f1/resourcegroups/bpmdemo003/providers/Microsoft.AppService/apiapps/dropbo xconnector", "gateway": "https://bpmdemo003423db32d4f584220961cb59f14c962f1.azurewebsites.net" }, "operation": "UploadFile", "parameters": { "FilePath": "@concat('tweets/logicapps/',triggers().outputs.body.Tweet_ID)", "content": { "Content": "@triggers().outputs.body.TweetText", "ContentTransferEncoding": "None" }, "overwrite": true }, "authentication": { "type": "Raw", "scheme": "Zumo", "parameter": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtc25hbWUiOiJFTUEuUmVzb3VyY2VQcm92aWRlciIsIm Z1bGxyb3ciOiJhbGwiLCJ2ZXIiOiIzIiwidWlkIjoic2lkOjE0Mjc0NzcwNjcxNDAiLCJpc3MiOiJ1cm46bW ljcm9zb2Z0OndpbmRvd3MtYXp1cmU6enVtbyIsImF1ZCI6InVybjptaWNyb3NvZnQ6d2luZG93cy1henVyZT p6dW1vIiwibmJmIjoxNDI3NDc3MDY5fQ.ihuWiXgyOpsG64Du6sAnRXxZGM_wtrJF0CJH0y-Rxfs" } }, "conditions": [ ] } }, "outputs": { } }

13 … more power RESOURCE MANAGER 8 functions for basic referencing and string functions Can only PUT resources into resource groups Auth must be through AAD Triggered manual through API LOGIC APPS Over 50 functions from string manipulations to math, to sets operations, to logical operators All HTTP operations supported on any arbitrary endpoint Supports many OAuth providers, AAD, Cert auth, or Basic auth 4 different ways to be triggered

14 Basic scenario Using WebHooks to start a workflow

15 User adds an item to a list in their Mobile app Mobile app has the callback URI for the workflow When the callback URI is called, the workflow immediately starts the “first*” action All dependent actions in the workflow continue as normal

16 Actions with simple orchestration 3 ways to introduce dependences between actions: 1.Implicitly – whenever you reference the output of an action you’ll depend on that action executing first 2.Explicit “dependsOn” condition – you can mark certain actions to run only after previous ones have completed “dependsOn” : “twitterconnector” 3.Explicit “expression” condition – a complex function that evaluates properties of other actions “expression” : “@equals(actions(‘twitterconnector’).code, ‘InternalServerError’)”

17 Actions that run in parallel will

18 Triggering a Logic app “Run” Recurring schedule – “every X hours” Polling an API for a response A 200 response means “run” -- a 202 response means “wait” Can use trigger state to get information on the previous execution Registering an API App to “push” to a workflow Using a custom contract implemented for API Apps WebHook Every workflow has an endpoint you can POST to from any web service Supports Basic auth for simple systems Manually User can click the “Run Now” button in the portal

19 The Next Level

20 Repeating Loop a single action over a list of items Runs the action N times You can get at all of the statuses for each action Tip: when you have multiple collections use: "repeat" : "@range(0,length(body('connector1')))" … "inputs" : "@concat(body('connector1')[repeatItem()], body('connector2')[repeatItem()])"

21 Conditionals Logic on a trigger or action For triggers conditionals are post- conditions For actions conditionals are pre-conditions You can do conditionals inside of repeats to perform as a filter

22 Parameters Dev Workflow Prod Workflow Definition Declares parameters Uri: @parameters (‘endpoint’) Definition (identical) Declares same parameters Uri: @parameters (‘endpoint’) Parameters Provides DEV config Endpoint : “http://int.mysite.n et” Parameters Provides PROD config Endpoint : “http://mysite.net” Re-using values, or even complex objects, throughout the definition, which makes it easier to comprehend Separate out config from the definition itself, making sharing easy, as well as across different environments.

23 Messages Large message support is built-in (<100 MB) To handle binary blobs of data you can: 1. Externalize state (save it to Azure storage) 2. Base64 encode it and return it directly in the workflow (workflows are JSON) All messages are archived Retention period depends on the App Service plan

24 Debugging tips Try calling the API App directly: POST {gatewayURI}/api/service/invoke/{api app name}/{operation name}?api-version=2015-01-14 x-zumo-auth : {your token} This may be a faster way to iterate if you are seeing failures Use requestb.in to debug triggers – you can inspect all incoming requests Enable logging for the Web app hosting the API App *New* you can Cancel a Run if it is failed

25 Q&A


Download ppt "T Sponsors Stephen Siciliano Senior Program Manager, Microsoft Inside Logic Apps BizTalk Summit 2015 – London ExCeL London | April 13th & 14th."

Similar presentations


Ads by Google