Logic App Concepts

Logic Apps is the part of the new Azure App Service which is a fully managed PaaS (Platform as a Service) for developers that makes it easier to build web, mobile and integration apps.

image.png

Logic Apps provides a new way to automating business process and running them in reliable way in cloud. Anyone who can use Azure should be able to start building long running business process that orchestrate data and services across cloud and on premise data centre. It is a browser based workflow engine that makes integrating disparate data sources, from cloud to on-premises easy.

image.png

So Logic Apps are basically a foundation of connectivity which provides very slick orchestration engine that allows you to build integration solutions using different pieces available in Azure App Service.

image.png

 

 

The following are some of the key pieces that comprise the Logic Apps experience.

Workflow

Logic Apps provides a graphical way to model your business processes as a series of steps or a workflow. It’s a visual designer where you can bring in logics from many different places and put them into a common surface to create your business process work flow.

You can check this demo by Josh showing how you can create a simple work flow to get a notification message on you mobile if a new customer is getting added in your Salesforce application.

image.png

If you come from BizTalk background you can relate this to orchestration where you can use different shapes to create a business process workflow.

Orchestration is much more powerful and have lot more features. Product team has announced that they are working on to bring most of those features in Logic Apps.

image.png

 

Connectors

Your logic apps need access to data and services. A connector is a special type of API app. It is created specifically to aid you when you are connecting to and working with your data. See the list of available connectors as of now.

image.png

    • Social Connectors: Facebook, Yammer, Twitter, Chatter, Twilio
    • Enterprise Connectors: Salesforce, SAP, Marketo, QuickBooks, SugarCRM
    • App + Data Services: Azure Media Services, Azure Mobile Services, Azure Service Bus, Azure Storage Blog, Azure Storage Table, Azure WebJobs, Box, Dropbox, HDInsight, Microsoft SQL, Mobile App, MongoDb, Office365, OneDrive, Oracle Database, Sharepoint
    • Integration: AS2, BizTalk EDIFACT, BizTalk Flat file encoder, BizTalk JSON Encoder, BizTalk Rules, BizTalk Trading Partner, BizTalk Transformation Service, BizTalk X12, BizTalk XML Validator, BizTalk XPath Extractor, Informix Connector, MQ Connector, Wait
    • Protocol Connectors: File, FTP, HTTP, POP3, SFTP, SMTP

All these connectors are technically API apps that uses a metadata format called Swagger and REST as pluggable interfaces and JSON as the interservice data format.

Swagger, most popular metadata format, is a specification for documenting REST APIs. It is language-agnostic so there are different implementations for different platforms.

In Azure API Apps, Microsoft adapts Swashbuckle to implement Swagger2.0.

By the way, if you don’t find any API App for your solution in Azure Marketplace, you can create your own custom API App.

image.png

So API apps in Azure App Service make it easy to develop, publish, manage, and monetize APIs. If you have some capability you want to expose as an API you should deploy it as API App and benefit from scalable RESTful API with enterprise grade security, simple access control, automatic SDK and Access on-premises data using Hybrid Connections.

You can bring your API as-is. You can use ASP.NET, Java, PHP, Node.js or Python for your APIs. Your APIs can take advantage of the features of Azure App Service with no changes.

 

Triggers

Some connectors can also act as a trigger. A trigger starts a new instance of a workflow based on a specific event, like the arrival of an e-mail or an insert of new record in the table of your database or a change in your Azure Storage account.

There are following 4 types of trigger are supported as of now:

  • Recurring Schedule – “every X minutes”

image.png

  • Polling an API for a response
    • A 200 response means “Run”
    • A 202 response means “Wait”
  • WebHook – Every workflow has an endpoint you can POST to from any service
  • Registering an API App to “push” to a workflow – using a custom contract implemented for API Apps

You can also trigger a Logic app manually by clicking on “Run Now” button in portal.

image.png

 

Actions

·Each step after the trigger in a workflow is called an action. Each action typically maps to an operation on your connector or custom API apps. Actions can have dependency and they can be executed based on the condition like success or failure of the previous action.

image.png

3 ways to introduce dependencies between actions:

  • Implicitly – whenever you reference the output of an action you will depend on that action execution first.
  • Explicit “dependsOn” condition – you can mark certain actions to run only after previous ones have completed.

image.png

  • Explicit “expression” condition – a complex function that evaluates properties of other actionsimage.png

If there is no dependency between actions then they would run in parallel. In this demo there is no dependency between Twitter and Dropbox action and hence both get the same message every time a new post is posted on user’s Facebook timeline.

image.png

 

BizTalk

For more advanced integration scenarios, Azure App Services includes capabilities from BizTalk. BizTalk Server is Microsoft’s industry leading integration platform. The BizTalk API apps allow you to easily include validation, transformation, rules and more in to your Logic App workflows. Find out more in what are BizTalk API apps.

BizTalk API Apps also bring the EAI and B2B integration functionality to Logic Apps. Watch this session by Prashant where he cover how you can work with XML data in Logic Apps, receive, process and send B2B data and use the new Rules Engine to implement business policies that are a part of your logic.

Resources:

https://azure.microsoft.com/en-in/documentation/articles/app-service-logic-what-are-logic-apps/

https://gautambiztalkblog.com/2015/06/18/exploring-and-evaluating-azure-logic-apps/

Advertisements

4 thoughts on “Logic App Concepts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s