Microsoft Standard Logic Apps Using Azure Portal

In this article we will discuss how to create Microsoft Standard Logic Apps using Azure Portal. Azure Logic Apps Standard is a cloud-based platform for automating logic app workflows that connect our apps, data, services, and systems. You can easily build highly scalable integration solutions for your corporate and business-to-business (B2B) situations. You may use either the Logic App (Consumption) resource type or the Logic Apps Standard resource type to construct a logic app.

The Consumption resource type is for multi-tenant Azure Logic Apps or integration services, whereas the Standard resource type is for single-tenant Azure Logic Apps.

Stateful and Stateless workflows in Standard Logic App

Stateful Workflow à When you need to keep, evaluate, or refer to data from prior events, create a stateful process. These workflows save and transfer all of the inputs and outputs for each action, as well as their states, to external storage, allowing for post-run analysis of the details and history.

If there are disruptions, stateful workflows give excellent resiliency. You can recreate interrupted runs from the preserved state and repeat the workflows to completion after services and systems have been restored. Stateful workflows can run for significantly longer periods of time than stateless processes.

Stateless Workflow à When you don’t need to maintain, evaluate, or refer to data from prior events in external storage for subsequent review, create a stateless workflow. These workflows save all of the inputs and outputs for each operation, as well as their states, in memory rather than on disc. Because the run information and history aren’t kept in external storage, stateless workflows feature shorter runs (usually less than 5 minutes), faster performance (quicker reaction times), higher throughput, and lower running costs. Interrupted runs are not automatically restored if there are outages, thus the caller must manually resubmit interrupted processes.

Create the First Standard Logic-App

Log in to the Azure portal Search Resource Groups then select Resource Group, under which you want to create the Standard LogicApp.

Microsoft Standard Logic Apps Using Azure Portal

After opening the Resource Group, you will see an icon ‘+ Create’ which will help to create a standard LogicApp. Click on the + Create icon.

It’ll open a new page where you can either directly search for LogicApp in the search box or you can click on Integration from the list of categories. After that, the LogicApp icon will appear, and you can click on Create.

It’ll open a new window where we need to fill in all the required details. Let’s fill in the basic details first, like,

  1. Subscription

  2. Resource Group

  3. Type à We are going to create a standard logic app, so we have to choose ‘Standard

  4. Publish à Here we have 2 options: we can publish on Docker container or can use the workflow. In this article we’ll use workflow.

  5. Region

Then click on Next: Hosting to configure the hosting and other configurations.

Under hosting configuration, we need to provide the storage and plan details.

For Storage,

  • Storage Type à Storage type could be Azure storage or SQL & Azure storage. In this article, we’ll use Azure storage.

  • Storage Account à  You can use the existing storage account or create a new storage account. In this article, we’ll create a new storage account.

For Plan

The plan you choose dictates how your app scales, what features are enabled, and how it is priced.

  • Windows Plan

  • Sku & Size

Click on Next: Monitoring to configure the monitoring and other configurations.

In the monitoring section, we can enable application insight to monitor the application. It will detect performance anomalies and include powerful analytics tools to help you diagnose issues and understand what users actually do with your app.

For this article, we are not going to use it. So we’ll keep it at the default value ‘No’.

Click on Next: Tags to set up the tags and other configurations.

Tags are name/value pairs that enable you to categorize resources and view consolidated billing by applying the same tag to multiple resources and resource groups.

Based on your needs and requirements, you can add the Tags, otherwise, leave it as it is.

Click on Next: Review + Create to check the final configurations and validation.

Final step to validate and review the information that you filled in previous steps. If in case have any validation issue or missing/wrong configuration, you can find here.

In case of success validation, you’ll see a button Create.

Here, you’ll see another option to download the template for automation that would help you to create this entire manual process in automated way with single click.

Once you click on Create, deployment will start and you’ll see a new window like below screenshot. It’ll show, Deployment is in progress. And it’ll not take much time to complete the deployment.

After deployment finished, you’ll see the message ‘Your deployment is complete’. Click on Go to resource.

After that, you’ll see the new window with your Standard LogicApp details, URL and all other configurations.

Create First Stateful workflow

We have successfully created the Standard Logic App, now let’s move ahead create the workflow. There are 2 types of workflows,

  • Stateful workflow

  • Stateless workflow

Let’s see, how to create Stateful workflow and test it using postman tool.

  1. Click on workflows à it’ll open new window where you’ll see an option ‘+ Add

  2. Click on ‘+ Addà new panel will open where we have to provide the Workflow Name

  3. Set State type ‘Stateful’ and click on Create.

After Stateful workflow successfully created, you could see an option to Edit in designer. Click on ‘Edit in designer’ which will open the designer view of workflow.

In designer view of workflow, let’s add some connectors, for this article, we’ll use very simple request-response flow, where request will come and we’ll send the custom response.

We have added the simple flow under this workflow like below screenshot.

Save the workflow, which will generate the URL which can be used for testing.

We have stateful workflow URL generated, now it’s time to test the flow.

Open postman application and pass the workflow URL. Then in message request body pass any random content like below. And hit the send button.

If your workflow successes then you could see the response code 200 and the custom message that you added for a response. In case of failure also you could see the response that will help to troubleshoot the issue.

Now, let’s check the execution detail in Azure portal.

We are again back to Azure port where we’ll just refresh the workflow. Now here, we’ll see the run history that can help to check the input and output details.

Click on the run-id (identifier) to overview the each steps of workflow.

Once we open the run-id, it’ll show the each steps execution result along with execution timing. Suppose if any stage we have failure then we can track it here as well.

That’s it about the Standard LogicApp stateful workflow. Let’s understand now the stateless workflow.

Create First Stateless workflow

Now, it’s time to see, how to create Stateless workflow and test it using postman tool.

  1. Click on workflows à it’ll open new window where you’ll see an option ‘+ Add

  2. Click on ‘+ Addà new panel will open where we have to provide the Workflow Name

  3. Set State type ‘Stateless’ and click on Create.

Here again, like the stateful workflow, we’ll have option to open the designer view and create the workflow.

For this article we have used the same scenario, receive the request and send the custom response back to requester.

Once we save the stateless workflow, it’ll generate the endpoint url, which we’ll use for testing purpose.

Now, let’s open the postman tool and pass the URL and request input like below screenshot.

Once we have everything then hit the send button and get the response back.

Let’s review the request and response in Azure portal.

We are back to Azure portal and let’s refresh the workflow. Now you could see the run history details.

If you are unable to see the run history then please check the debug mode. To see the run history in stateless workflow, you have to enable the debug mode, then only you can view it under run history.

Caution: Keep the debug mode disabled if it’s not required.

Conclusion

That concludes this post, which provided an overview of Microsoft Standard Logic Apps and workflows.

Leave a Reply

Your email address will not be published.