Sunday, March 18, 2018

Getting Started with Logic Apps - Fundamentals

What is Logic App?

It is workflow, an orchestration in cloud (which is hosted on Microsoft Azure) with connections to systems, services.

It is an Offering from Microsoft primarily to cater the need of integrating and designing business workflow/process with orchestrating the SAAS services. It also now extends to services which are on premises.

It is one of the Service amongst the other Azure App Services (Web Apps, Mobile Apps, API Apps,Functions) and runs on top of Azure Service Fabric. It is a fully managed iPaaS (integration Platform as a Service) solution which allows developers to build highly scalable workflows and will automatically scale to meet demand. 

Logic app on Azure Service Fabric

In Layman term – Microsoft has provided a platform which is managed by them to enable a user to design/create a workflow which has a provision to connect services which are cloud based or also on premises (integrating various services) thus the name IPaas (integration Platform as a Service). You get a browser based designer (also available in visual studio), where you can design the workflow by selecting the appropriate Trigger (the way to start the workflow based on certain event ) thereafter adding new steps Action (it can be after a Condition) where you select the Connectors(the way to connect to data ,services or system). After you save the workflow, it gets deployed – ready to use. And you don’t have to worry about the load scenarios, it auto scales and you are charged only when it is executed (number of Actions).

It is also marketed by Microsoft as Serverless, by serverless it doesn't mean there are no servers, it just means the developers do not have to worry about the underlying infrastructure (there is an Abstraction) instead they just have to focus on the business logic (faster development). The other two offerings under serverless are Azure Functions and Event Grid

serverless offerings from Azure

Logic Apps is based on the Workflow Definition Language and provides a way to simplify, automate and integrate scalable workflows into the cloud, WDL is based on following basic structure
wdl basic structure

So whatever you create in Logic app Designer gets converted in JSON. JSON is used to define the workflow based on WDL, and same can be seen in Code view in Portal or in Visual Studio.

Thus from development perspective- Logic app is nothing but JSON definition along with ARM Template and from runtime perspective - Logic apps is a Job Scheduler with a JSON based DSL describing a dependency graph of actions.

Building Blocks of Logic Apps


Logic Apps always start from a trigger and then execute a series of steps. As in BizTalk Message creates instance of Orchestration likewise trigger creates an instance of Logic Apps.

Push, pull, repeating and manual are way to trigger Logic Apps

Push – This is reactive type, where the consumer notifies the workflow or creates an event to start the workflow(logic app endpoint).

Poll(pull) – This is proactive type, where the workflow polls a system or service for notification or event.(Service endpoint)

Repeating(Recurrence) – Prescribed Schedule to start the workflow

Manual – Manually starting the Workflow(You can click Run now button in Portal)


In my perspective, the base of Logic Apps is connector – everything in logic apps is around connectors (All components are api apps). All connectors are technically API apps that uses a metadata format named swagger, REST as pluggable interfaces and JSOn as the data interchange format. It can act as trigger and action, to connect with any service is via either  by Trigger or Action and both are api connections.. In other words, connectors is encapsulation of authentication, data validation in combination of Triggers and Actions.

It is on same line as that of Adapters in BizTalk. And at the time of writing this post there are 200+ connectors available, and every week there is addition to it.

     1.Standard connectors
    This are pre-included and are available in Logic App and does not cost extra.

     2.Integration account connector
It comes at extra cost as these connectors become available when you create Integration Account. It enables us to deal with complex integration scenarios where maps, trading partners management etc are involved .

Integration Account connector

3.On premise connector(Hybrid connector)
     This are the connectors used for connecting to systems which are on premises,
     and this is done with the help of on-premise data gateway.For now connectors for DB2, Oracle DB, SQL Server, FileSystem and Sharepoint server, Informix, Websphere MQ etc are available.

    4.Enterprise connectors
 It comes at extra cost for Enterprise level systems like MQ and SAP.

    5.Custom connector
 If none of above connectors satisfy the need, then there is provision to create a custom connector just like we have provision in BizTalk to create custom Adapter.


Every step after in Logic App (even trigger) is called Action (condition can be before it). Action always mapped to operation in Managed Connector or web api.

Enterprise Integration Pack

Integration Account is required for Enterprise integration Pack. It enables to have BizTalk like power in cloud, where you get provision to store the artifacts (xsd, maps, trading partners etc) and use them to build Enterprise level B2B/EAI solution. It has supports for industry standard like AS2,EDI X12, EDIFACT , Flatfile,XML etc.

All the features around B2B/EAI solutions like validation, transformation, Encoding , decoding are made available through it enabling to have solutions build in Serverless fashion.

Flow controls

  • Scope
         Logical grouping of actions

  • Response
       For any request that comes in there can be response associated with it

  • Condition
     Evaluates an expression and executes the corresponding result branch

  • ForEach
     Will iterate over an array and perform inner actions for each item

  • Until
     Will execute inner actions until  a condition results to true

  • Switch Statement
     Only one branch will be executed corresponding to condition of the            particular   case

  • Calling another Logic App (Nesting)
     Workflows can be nested by making a workflow exposing a  callable endpoints (can be reached over an url)

  • Calling custom code via Azure function
     In a scenario where custom code is required to be executed, the code can be added as Azure function and can be called from Logic app


Security in Logic app can be applied in various ways and on different levels like securing access to triggers, securing access to Run History, securing logic app editing etc.

Out of box we have provision of SSL(shared access signature) and restriction can be applied as to who all can call the logic app based on IP Addresses(IP Filtering), you can look at it at Settings->Access control configuration. Azure Role Based Access Control  and Azure Resource Lock can be used to prevent accidental/intentional editing or deleting of the logic apps.

If you think above aren’t enough, then we have option to leverage the power of APIM where Azure Active Directory, certificate, OAuth, or other security standards can be used.


For monitoring there is out of box feature which tracks and enables us to view the state of each logic app instance – Run history , it includes all the details like input and output of each step in the workflow. Through this we can check if workflow was successful or failed, how much time it took to complete, what was input received, what was the output, also exception details if there are any.

Also on same line we have tracking for Triggers – Trigger history which keeps state of triggers if they were successful, failed, skipped etc.

Apart from above two we can leverage  azure diagnositcs, api management, azure alerts for additional monitoring of Logic apps and implementing alert mechanism on top of it.

Related Post

Monday, November 13, 2017

Begineer to BizTalk Expert: Interview with Steve Melan

Welcome to the 31st interview of the series, today's expert is Steve Melan .

He is  working as an IT Architect for the State's and Government Bank of Luxembourg (BCEE) since 2005. His main focus is on Host Integration Server (IBM Legacy Integration and Migration).

Specialties: Programming Languages : C#, VB.NET, COBOL
Technologies : ASP.NET, Winforms, WCF, LINQ, ADO.NET, IBM CICS
Databases : IBM DB2, MS SQL Server
Microsoft Products : Visual Studio, BizTalk, Host Integration Server, Team Foundation Server, Internet Information Services, Surface, Kinect

Let’s begin the interview…

Mahesh: Who are you and what you do? 
Steve: My name is Steve Melan, I’m a Senior Solution Architect at the State’s and Saving’s Bank of Luxembourg (also called BCEE / Spuerkeess). I’ve started working at the bank in the year 2005 by building a complete new infrastructure based on the Microsoft .Net Framework. As the bank still uses IBM Legacy/Heritage Product, I integrated the IBM Mainframe into the .Net Architecture using Microsoft Host Integration Server (part of the Microsoft BizTalk Server). I architect, design solutions, guide installation and configurations of BizTalk, Host Integration and Internet Information Server environments. Within the Business Unit Application Integration and Middleware (AIM), I lead a group of around four professionals regarding knowledge management and am responsible for sharing knowledge, exchanging experiences, and facilitating internal trainings. Since 2006, I’m working together with the Microsoft Host Integration Server Product Team in Redmond in order to fix bugs, increase security and to add more new features to their product. In 2013, I’ve received the Microsoft MVP Award for the first time. 

Mahesh: When did you start working on BizTalk?
Steve: 2006, I’ve started using BizTalk Adapter for Host Systems (Host Integration Server).
2009, I’ve started using BizTalk Server 2009.

Mahesh: How did you mastered BizTalk (Learning path, amount of time)?
Steve: In 2007, I’ve got a great overview of the BizTalk Server during the Microsoft TechEd and TechDays. Several ‘Hands-on-Lab’ helped me to start my first BizTalk Project. After that, I learnt almost everything from books (like BizTalk Recipes – A Problem-Solution Approach) and from blogs (like Saravana Kumar).

Mahesh:Which are the major projects you handled so far?
Steve: Actually, the bank is running more than 65 different BizTalk Projects based on a framework I’ve started developing in 2010. One of the most important project was the migration from eGate (Java EAI/ESB) to BizTalk. Another very important project was the integration of SWIFT (FINancial Messaging) using the BizTalk Swift Accelerator.

Mahesh: What do you think is the most challenging part while working on Integration project?
Steve: The most challenging part is to understand how the different infrastructures are working in order to integrate them in one common framework. 

Mahesh: How do you see BizTalk compare to other integration platform?
Steve: BizTalk is still one of the key actors in the integration space. The biggest advantage of BizTalk compared to other integration platforms is that Microsoft offers a complete stack of products to ensure an easy and smooth integration.

Mahesh: What as per you is must to know to become an Integration(BizTalk) Expert?
Steve: Becoming an Integration Expert means that you have to know a lot of different technologies and the experience you have in different domains allows you to choose the best available solution for an integration project.

Mahesh: What are your thoughts on forums, blogs and articles etc.?
Steve: The community around a product is always a key of success for the platform. Microsoft encourages the community by rewarding their technical skills with the Microsoft Most Valuable Professional Award (MVP). Thru blogs and articles, companies get inside information about features, bugs, fixes and the roadmap of a product.

Mahesh: Your suggestion to a newcomer? What should be approached to get sound knowledge in BizTalk?
Steve: As BizTalk is a highly complex product, newcomers should start with simple projects like a basic receive and send between two folders. This project should serve as a foundation to extend the skills. You have to learn a lot of different technologies by reading and observing. Books, blogs, articles and ‘Hand-on-labs’ are a good start to become an expert. During one large project, you will of course face several difficulties, but these will allow you to increase your skills.

Mahesh: There are many tools from community which support BizTalk in some or the other way(like BTDF, Bizunit etc), what do you say about it? Which ones you would recommend? Why? No Microsoft support available?
Steve:There are several products available from the community that I’m using in my everyday business. BizTalk360 allows you to get more inside information about what is going on inside of BizTalk. In addition, it allows you to do all the basic application and server handling with just one click from a well-designed web interface. BizTalk MessageBoxViewer and HealthMonitor are two essential products for the administration and health check of the infrastructure.

Mahesh: What is the future of BizTalk?
Steve:BizTalk isn’t dead. That is what most competitors want. BizTalk is still alive and the community grows. The BizTalk Product Team actually collects new ideas for BizTalk vNext ( BizTalk will remain being one of the Microsoft key product for integration and allows to build a hybrid integration platform

Mahesh: What motivates you to do the community work?
Steve:For me, the highest compliment is to see people finding their solutions through my answers. The biggest motivation is that this community work has helped me both, share and receive knowledge. In addition, I’ve got in touch with many great IT people, now I consider them as my friends.

Mahesh: As per the Roadmap provided by Microsoft, Logic Apps will be able to run on-premise in addition to AZURE. Do you think Azure Stack Logic Apps on prem will supersede BizTalk Server?
Steve: Microsoft Logic Apps on-premise will completely fill a gap. Getting this now available in Azure Stack is something that the community was waiting for. They allow you to create easily a hybrid cloud with some of the BizTalk capabilities. Azure Stack Logic Apps will NOT supersede BizTalk Server. From my point of view these are two different products that allow integration. BizTalk Server is much more advanced in mappings and orchestrations than Logic Apps.

Mahesh: From my perspective, Microsoft keeps coming up with overlapping technologies like recent ones MABS, Microsoft Flow and Logic Apps, in some situation it gets puzzling. What you say?
Steve:These technologies have all something in common. They allow integration between heterogeneous infrastructures but they are targeting a complete different group of users. Microsoft Flow is an amazing easy to learn platform for end users as Logic Apps are more focused on IT people. Microsoft should create a ‘poster’ showing how all these technologies work together.

Mahesh: How do you see the step of Microsoft releasing Feature Pack for BizTalk?
Steve: Releasing BizTalk Feature Packs allows customers to get easier and faster new features for the product. Before BizTalk 2016, customers had to wait for a next BizTalk release in order to get new features.

Mahesh: Do you think the cost of using cloud services (Logic App, Service Bus etc) will be more than having infrastructure on prem. (Where transactions are in millions or more)?
Steve: The use of the cloud offers many advantages that you cannot cover with an on-premise infrastructure like fast and dynamic scaling in case of a temporary high load. It is hard to compare because maintaining an on-premise infrastructure also has some costs. It depends really on the needs and I think that hybrid scenarios will be the key of success.

Mahesh: Recently BizTalk components are made open source, how do you see this Microsoft Move?
Steve: Opening the BizTalk component framework is a great move from Microsoft. It allows the community to extend the product.

Mahesh: Being a MVP, do you think more responsibility gets added on you?
Steve:Being a MVP, means having more responsibility. People are looking up to you and consider you as being their solution hero. It’s a privilege being part of the MVP family. You get so much great deep information about a product, help to shape the vNext release and to fix bugs. The Microsoft Product Team uses you as their specialist on the field to get information how their product is getting used.

Thanks a lot Steve for taking out time and sharing your insights, experiences, this will surely benefit many !!!

Feel Free to ask questions to Steve in the comments!!!!!!!!

Related Post:

Wednesday, November 1, 2017

Feature Pack1 Application Insights does not work with SQL Named instance

Am facing strange issue while enabling Application Insights, error as below

error while enabling analytics

Why it happened

From error it appears some issue with database connectivity, and what I found, it is working absolutely fine on my VM and also on a another test server (both of them have default SQL instance).
An attempt to connect BizTalk management db failed

Whereas on the server which are configured against the Named Instance are causing issue, and the reason for that  I see - an extra slash gets added, thus attempt to connect to management DB failed.

What to do

I have raised a question with product team, and will update the post once received fix for the same.

Has anyone else faced this issue - what you did?

Update: Got response from product team, they confirmed - BizTalk Server 2016 with Feature Pack 1 tracking-to-Application Insights does not support SQL Server named instances. And they add this to their backlog, try if can get this supported in Feature Pack 2 or 3.