Welcome again to another Logic Apps Best practices, Tips, and Tricks. In my previous blog posts, I talked about some of the most essential best practices you should have while working with the Azure Logic App:
- #1 Logic App Naming Convention
- #2 Actions Naming Convention
- #3 Add comments
- #19 Protect your Logic Apps (Part I) – Using API Management to expose the Logic App and Implement IP Addressing Restriction
- #19 Protect your Logic Apps (Part II) – Secure data in the run history by using obfuscation
And some tips and tricks:
- #4 Using Scopes
- #5 Delete comments
- #6 Error handling configure run after settings
- #7 Learn from failures
- #8 Expressions nightmare
- #9 Control your connectors (API connections)
- #10 Fix connectors (or API connections)
- #11 Connectors naming convention
- #12 Choose your developer tools properly
- #13 Logic App (Standard) vs (Consumption)
- #14 Implement good governance policies
- #15 get the error message
- #16 roll back to a previous version of an Azure Logic App Consumption
- #17 using other HTTP Methods then POST
- #18 Foreach Parallelism
- #20 Accessing Runtime Settings (Part I) – Logic App Consumption
- #20 Accessing Runtime Settings (Part II) – Logic App Standard
Today I’m going to speak about another important Best practice, Tips and Tricks that you need to consider while designing your business processes (Logic Apps): Moving or Organizing shapes inside Visual Studio Logic App designer.
Moving or Organizing shapes inside Visual Studio Logic App designer
At this point, you may be wondering, Sandro, what is the big fuzz around moving shapes inside the Visual Studio Logic App designer? It is drag-and-drop! It is a basic and easy task, and not too much to say about!
Well, when we speak about Visual Studio Logic App designer nothing is that simple. I sometimes think that the Logic App team did a great job overcomplicating what should be simple, and this is one of these cases. In fact, moving, organizing, or reordering shapes inside the Visual Studio Logic App designer can be a frustrating, time-consuming, and annoying task. Luckily for us, there are some tricks that you can use to minimize the impact of this experience, and more importantly, it will allow you to be more productive.
But first, let’s explain the issues that you may find when performing these tasks:
- You may easily move the first shape/action inside a Scope, a For each, or a Condition branch (or any other shapes that allow you to have more than one action), but you may find it hard or impossible to move the second shape/action
- Once again, you may find it hard or impossible to move a shape/action to the top or to the bottom inside a Scope, a For each, or a Condition branch (or any other shapes that allow you to have more than one action).
And you may find other similar situations while organizing the actions. Of course, all the examples we show here don’t have any dependencies between the actions, so we can organize them in the order we want. Otherwise, we had to respect the dependence order.
So, the main question is how we can quickly move, organize, or reorder the action the way we intend to. The trick I use is quite simple:
- Before I start to drag and drop the shapes to the Scope, a For each, or a Condition branch (or any other shapes that allow you to have more than one action), I add two support dummy actions, usually an HTTP action.
- Then, I drag and drop the actions I want, in the order I want, into the middle of these two support dummy HTTP actions.
- In the end, I delete the two support dummy HTTP actions.
Sometimes, and depending on the situation, the same happens when I already have the actions inside the branch, and I want to drag one action in the beginning and at the end. But in that case, I can also move the action just above the last action inside the branch and then fix the order.
I hope you enjoy this developer tip and stay tuned for the following Logic App Best practices, Tips, and Tricks.