top of page
  • Writer's pictureMarcel Haas

Top 5 benefits of using a State Machine Pattern in Microsoft Flow

Updated: Jan 29, 2019

As you already might have noticed, I'm a big fan of state patterns in Flow. Please read my top 5 reason why and see if you can benefit from this solution.


Beside overcoming general pitfalls, this state pattern based on Azure Storage Queues, provides you with a lot of beauty.

I picked my personal top 5 benefits:

  1. Much better readability/designability of your Flows, thanks to splitting of controller and worker logic. This is huge, then just buying a bigger screen shouldn't be the answer to efficient Flow design and limits exist for a reason.

  2. Elimination of duplicate logic and repeating patterns within a Flow, because of trying to build all in one giant. Microsoft will come up with "state" in Business Process Flows, which will allow much more flexible design options, but at least until then, this here is a great solution.

  3. Very easy to co-create with others. As we agree on clear design patterns, development work can be done in parallel by different dev's in different solution areas. This results in lower time to market of the solution and more rapid implementation cycles.

  4. Azure Queue Storage is very cost effective solution. These connectors belong to the set of Standard Connectors and don't require a premium plan for each user. As for example the HTTP connectors will require starting from spring 2019. This makes a huge difference in price, as 1GB of queue storage costs about $0.07 and max message size is 64k.

  5. It's an easy to implement, generic, scalable, robust and meeting enterprise software design standards. JSON used as a data exchange format for the state object, is very flexible and can basically contain any data, even binary.

This is a pattern, use it only, when it makes sense and adopt it to your needs. I'm here to help, just contact me on Twitter.


How does a "State Machine" look like?

State Patterns are basically here to resolve mathematical problems. So they don't "look" that much, but I tried to visualize the high level solution architecture in color, so you can get an idea of the whole thing and come back, when reading the details later on.


Content Index

There is a lot more of content available to you:

64 views0 comments


bottom of page