Chapter 8. A Deep Dive into Logic Apps

 

Logic is the beginning of wisdom; not the end

 
 --Spock Star Trek

In previous chapters, we discussed how to automate business process with Azure Logic Apps and its different concepts such as workflow, connectors, trigger, and actions. In this chapter, we will dive deep into Azure Logic Apps by creating a complex business workflow using features such as control flow, looping, and exception handling. We will look at the Logic Apps code view and play around with the workflow definition language. We will explore the ability to call nested Logic Apps directly from Logic Apps designer.

This chapter introduces the following topics:

  • Workflow definition language
  • Content type in Logic Apps
  • Logic Apps loops, scopes, and SplitOn
  • Exception handling in Logic Apps
  • How to build a complex workflow using on-premise data gateway for Logic Apps

Azure Logic Apps provide a new way to automate business processes and running them in reliable way in cloud. Anyone who can use Azure should be able to start building business process that orchestrate data, connect systems, and services across cloud and on-premise resources.

Any workflow that is created in Logic Apps has an associated workflow definition that contains the actual logic that gets executed within the Logic App engine. The workflow definition is a JSON definition file that contains one or more triggers that initiate the Logic app and associated single or multiple actions.

Workflow definition language

The workflow definition contains the actual business logic that is defined as part of the Logic Apps built. Workflow definition language is described thoroughly over Microsoft documentation: https://docs.microsoft.com/en-us/rest/api/logic/definition-language.

The basic structure of workflow definition Language is as follows:

{ 
      "$schema": "<schema-of the-definition>", 
      "contentVersion": "<version-number-of-definition>", 
      "parameters": { <parameter-definitions-of-definition> }, 
      "triggers": [ { <definition-of-flow-triggers> } ], 
      "actions": [ { <definition-of-flow-actions> } ], 
      "outputs": { <output-of-definition> }     
} 

Element name

Description

$schema

This specifies the location of the JSON schema file that is used for workflow definition language. This is required when you reference a definition externally.

contentVersion

This specifies the version of the definition.

parameters

This is the list of parameters that are used to input data into the definition. A maximum of 50 parameters can be defined.

triggers

Data that can start a Logic App workflow. A maximum of 250 triggers can be defined.

actions

This specifies actions that are taken as the flow executes. A maximum of 250 actions can be defined.

outputs

Any information that is returned from a workflow run. Maximum of 10 outputs can be defined.

In the previous chapter, we looked into details about trigger and action and how it works within the Logic Apps to build a reliable workflow in cloud. In this chapter, we will cover the rest of workflow definition sections to make a deep understating on the underlying concept.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset