top of page

Scalable and Dynamic Approval Workflows in Power Platform


Organizations around the globe are going through an era of Digital Transformation, a key part of this evolution is to automate manual approval processes into digital ones. Every Power Platform Citizen or Pro developer must have used Power Automate flows to send Approval requests for something, where the Power Automate Approvals is quite powerful and easy to use, it, however, runs into limitations either enforced by the platform or the way it has been designed


In this blog, I will present a pattern of how you can use Power Platform and Outlook Actionable messages to create an approval system that is highly dynamic and scalable, as I said this is a pattern but I have also developed an example solution to demonstrate its viability which you can download from here and modify to suit your needs.


Characteristics of a scalable and dynamic approval system


  1. Provides a Decision Table system that allows running different approval paths based on the attributes of the record you are approving

  2. Allows Admins to setup these approval paths, and approval paths are not restricted to any limits

  3. The Approval Paths are not "hard-coded" i.e. it is possible to modify the number of approvals or approvers before the workflow has started or while it is inflight

  4. It provides multiple channels of approvals, i.e. not just through emails but also through the apps.

  5. It captures the full workflow history for auditing purposes

  6. It is not restricted by Run Duration limits of Power Automate

  7. It shows a consolidated list of pending approvals within the app and allows to take action on them


First, let's have a demonstration of what the implementation looks and then we will deep dive into the solution components and configuration details




Solution Components


Key DataVerse Tables


Workflow Configuration

"Decision Table", this is maintained by an admin and is used to set up the approval flows for each combination of key decision attributes


Workflow Stage Configuration

Represents a stage in a workflow configuration, stages must be in sequence and the first one must start at 1


Workflow Stage Approvers

Each stage can have one or more approvers, approvers can be nominated as mandatory or optional, each stage must have at least one mandatory approver


Project Proposal

This contains the record that needs approval, this is created by the user


Project Proposal Approver

Each project proposal can have multiple approvers, this gets populated by a background process (flow) according to the workflow configuration


Workflow

Stores each instance of the workflow, a project proposal can have multiple instances of a workflow


Workflow Task

Stores each workflow task, a workflow can have multiple tasks, this gets generated by the background process



Key Cloud Flows (Power Automate)


Generate Project Proposal Approvers

This gets triggered on Project Proposal creation, based on the key attributes it finds the right workflow configuration and generates the list of approvers on that workflow configuration in the Project Proposal Approver table, this can potentially be replaced by a plugin


Create Workflow for Project Proposal

This creates a record in the Workflow table against the selected Project Proposal, it also generates the list of Workflow Tasks based on the key attributes of Project Proposal and the workflow configuration, this can potentially be replaced by a plugin


Start Project Proposal Workflow

This flow updates the status of workflow and activates the tasks in the first stage


Send Approval Notification

This sends an outlook actionable message to the assignee of the workflow task, Actionable messages are quite fundamental to this design so a better understanding of it is required


Receive Approval Result

This a HTTP triggered flow that listens to the approval outcomes, the buttons on the actionable messages, and the approval buttons in the app call this flow, it also sends back the responses actionable card


On Workflow Task Status Update

This is the key controller flow, that runs on the task status updates, i.e. when a task gets approved or rejected, based on the outcome it decides whether to progress the overall workflow to the next stage, stop the workflow or wait for more responses. The is the brain behind this pattern


Apps


Scalable Workflow Management

Model-driven app, intended to be used by Admins to define workflows


Project Proposal Submission App

Canvas app for users to create project proposals, nominate approvers, create and start workflows, also for approvers to respond to approval requests



How to use this solution


  1. Download the unmanaged solution from Github

  2. Import it in the target environment

  3. Make sure all the flows are turned on

  4. Review the environment variables, there are 4 environment variables named after the cloud flows, please update the default values of these variables with the HTTP trigger URL from the flows

  5. Log on to the Actionable Email Developer Dashboard

  6. Register a new provider

  7. Make sure to use the Receive Approval Result HTTP trigger URL in the Target URLs field and keep the scope as Organization

  8. Once registered, it will show a Provider ID, copy that into the Actionable Email Provider Id environment variable

  9. Optionally update the logo URL to your own logo


and that's it, you are ready to go.



Happy Sharing!





bottom of page