Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to access Application settings fields value from Logic app Standard workflow | Using Application settings as configuration store for Logic app standard workflow

{tocify} $title={Table of Contents}


Introduction


Most of the time, there is a need to have a configuration store where we can store key-value settings and consume stored settings from applications.


Is there any way in Azure Logic App to create and use configurable values?

In case of Logic app consumption - there is no such provision. Following post shows an example about how to do it with help of Azure Table storage - Using Azure Storage Account Table as Config Store  for Logic Apps Consumption


However, in case of Logic app standard - there is a provision. We can make use of Application Settings under Configuration.

Let's see with an example


Scenario

Say, in the workflow you want to execute few steps which is based on a flag. 

But the flag value depends upon business team's advice. If it is set to yes then it is to be processed else not.

Here, for the sake of demo, we will send different responses based on flag value.

Let's look at the example

Create Solution 


First, we will add key/value pair in Application settings with key as ProcessFlag and value as True, followed by creating a workflow in which we read value of it.

Add ProcessFlag(key value pair) in Application Settings




Note: Any setting(key/value pair) in Application setting is available for all the workflows in Logic app.

Create a Logic App Standard workflow to access flag value from Application settings

Add a new workflow in Logic App with http trigger, followed by Initialize variable action


Provide a name, type as string and against value provide following expression which uses appsetting template function
             
                                  appsetting('ProcessFlag')

This function does lookup in Application setting with the Key provided to it and returns the value which is set against it.


Add condition to check value of above variable at runtime



Set Response body as "Request Processed as Process flag is : @{variables('Value_AppSetting')}" when variable value is True



Set Response body as "Request is not Processed as Process flag is : @{variables('Value_AppSetting')}" when variable value is False


Testing

Any rest api client can be used to test it, here postman is used.

Copy the url from Overview page of workflow and use it for testing for following test cases.

1. When Process Flag is set to True in Application Settings





2. When Process Flag is set to False in Application Settings






Summary

With this post we saw that with Logic App Standard, there is a provision to store workflow specific settings/configurations in Application settings.

And how we can access/read it from workflow with the help of appsetting template function, also how the change in setting does not require any code changes in workflow.

It's good add on, which can help to control behavior of workflow from outside.


Learn More about Logic App

  • Developing Logic app standard workflow which uses Map locally  and deploying to Azure
  • Developing Logic App Standard Workflow Using Visual Studio Code | Create Logic App Standard Workflow Using Visual Studio Code
  • Logic App - Xml to Json using Liquid Map | Append in Liquid Map
  • How to use Azure Event Grid Custom Topic | Publishing and Subscribing from Azure Event Grid Custom Topic using Logic App
  • Using Azure Storage Account Table as Config Store  for Logic Apps | How to read and write from Logic App to Azure Storage Account Table
  • Get Logic App Name in Logic App
  • Difference between Logic App Consumption and Logic App Standard 
  • Getting Started with Logic App Standard | Overview of Logic App Standard | Basics of Logic App Standard
  • How to find count of Logic App executions using Azure Portal
  • Azure Functions vs Azure Logic App | Difference between Azure Functions and Azure Logic App
  • Getting started with Logic App : Liquid Map | Using Liquid template in Logic app
  • How to get actual error message of Scope in Logic App | Exception Handling in Logic app
  • Interview questions and answers on Logic Apps | Interview questions for azure logic app developers
  • How to execute Stored Procedure in Logic App | How to connect to SQL in Logic App
  • How to get current date in logic app | How to format date time in Logic App
  • BizTalk Developer getting started with Logic App
  • Getting Started with Logic Apps - Fundamentals
  • Getting Started with Logic Apps - Enterprise Application Integration
  • Getting Started with Logic Apps - AS2
  • Getting Started with Logic Apps - EDI X12 Fundamentals
  • Getting Started with Logic Apps - XML to EDI X12
  • Getting Started with Logic Apps - EDI X12 to XML
  • Getting Started with Logic Apps - What happened to the Request?
  • Inserting Multiple Records In On Prem SQL Using Logic App
  • Inserting data in On Premises SQL Database using Logic Apps
  • Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
  • XML Batching(Aggregation) in Logic App
  • Batching(Aggregating) messages in Logic App
  • Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn
  • Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn
  • Securing Logic App with Azure Active Directory authentication
  • Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map
  • Using Managed Identity in Logic Apps for Calling Active Directory Secured Function App
  • Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping
  • Logic Apps : For Each Inside a For Each - Fetching values from field in an array inside an array



This post first appeared on TechFindings, please read the originial post: here

Share the post

How to access Application settings fields value from Logic app Standard workflow | Using Application settings as configuration store for Logic app standard workflow

×

Subscribe to Techfindings

Get updates delivered right to your inbox!

Thank you for your subscription

×