Loading...

Rules of Engagement: How Plugins, Workflows, and Power Automate Coexist in the Execution Pipeline

Rules of Engagement: How Plugins, Workflows, and Power Automate Coexist in the Execution Pipeline

Understanding how the three automation engines interact—Plugins, Classic Workflows, and Power Automate—is essential for designing predictable, scalable, and conflict-free business logic in the Power Platform. Each automation type runs at different layers, at different times, and with different capabilities. When combined without rules, they create race conditions, duplicated logic, inconsistent data, and performance issues.



This guide explains when each tool executes, what they are best suited for, how to avoid conflicts, and how to design the execution pipeline properly.

1. The Dataverse Automation Stack – High-Level View

2. What Runs Where? (Rules of Engagement)

A. Plugins — “First Responders” (Synchronous or Asynchronous)

Where they run:

  •  Deep inside the Dataverse execution pipeline
  •  Before or after the database commit

Best for:

  • Real-time validation
  • Enforcing business rules
  • Data transformation
  • Preventing bad data from saving
  • High-performance logic
  • Complex parent/child relationship logic
  • Custom API execution

Rules of engagement:

Plugins ALWAYS run before Power Automate & classic workflows

Synchronous (real-time) plugins can stop an update/creation

Asynchronous plugins run right after the transaction commits

Plugins see full transaction context (Target, Pre-Image, Post-Image)

Think of plugins as:

The enforcement layer → “clean and validate the data before anything else fires.”

B. Classic Workflows — “Legacy Post-Processing”

Where they run:

  • ONLY after the record is saved
  • Never before the database write
  • Execute within Dataverse async service

Best for:

  • Simple post-update logic
  • Legacy systems still using workflows
  • Send simple notifications
  • Background operations

Rules of engagement:

  • Workflows cannot prevent data from saving
  • Will always run after plugins
  • Losing relevance → replaced by Power Automate

Think of workflows as:

The old automation engine still supporting background jobs.

C. Power Automate — “Orchestration Layer”

Where they run:

  •  External orchestration platform
  • Triggered after Dataverse writes a record
  • Not part of the transaction pipeline

Best for:

  • Long-running business processes
  • Multi-step approvals
  • Cross-system automations
  • HTTP calls, integrations
  • Notifications, reminders
  • Orchestrating multiple Dataverse operations

Rules of engagement:

  • Triggered after the database update
  • Does NOT see pipeline context (no Pre/Post image)
  • Does NOT prevent save
  • Subject to delay, flow throttling, retry, async nature
  • May run twice if not designed correctly

Think of Power Automate as:

 The integration and process orchestration engine.

3. The Real Problem: When All Three Run Together

Without architecture governance, mixed automations cause:

  • Duplicate updates
  • Infinite update loops
  • Conflicts between plugin validation and flow logic
  • Race conditions (which automation runs first?)
  • Slow performance
  • Hard-to-debug business logic

This is why rules of engagement matter.

4. Clear Rules of Engagement for Architects

Rule 1 — Anything that must block or validate MUST be in a plugin.

Because only plugins can stop transactions.

Examples:

  • Prevent duplicate records
  • Validate SIRET/VAT numbers
  • Restrict field changes
  • Enforce security

Rule 2 — Anything that requires pipeline images MUST be a plugin

Power Automate does not have Pre/Post images.

Examples:

  • Compare old vs new value
  • Detect attribute-level changes
  • Validate before-save data

Rule 3 — Cross-system integration → Power Automate or Azure Logic Apps

  • Plugins should NOT call external HTTP services directly unless absolutely necessary.

Rule 4 — Post-commit processing → Use async plugins or Power Automate

Examples:

  • Notifications
  • Post-create enrichment
  • Case routing
  • Background calculations

Rule 5 — Never mix plugin + flow updates on the same field

  • This causes endless update loops.

Rule 6 — For reusable business logic → use Custom Actions

Plugins and Flows can both call the same Custom Action.

Custom Action acts like:

  • Shared business logic layer
  • Versioned API
  • Secure execution pipeline

5. Real-World Scenarios: What to Use When

Scenario A — Enforce Blacklist Validation on Account Creation

  • Must stop save → Plugin
  • Requires Pre-Image → Plugin
  • High performance → Plugin

Scenario B — When Account Created, Notify Sales Team

  • Simple post-event notification
  • Power Automate or async plugin

Scenario C — Prospect integration with Web API

  • Power Automate with HTTP Connector

or

  • Plugin calling Custom API

Scenario D — Validate IBAN, SIREN, VAT Number

  • Needs real-time validation
  • Must block save
  • Uses regex patterns

→ Plugin

Scenario E — Complex business process

  • Multi-step approval
  • External users
  • Long-running

→ Power Automate Cloud Flow





6. Architectural Summary Table


How They Coexist

The coexistence works only if each automation stays in its lane:

  • Plugins = transactional, validation, enforcement, data integrity
  • Power Automate = orchestration, integration, long-running workflows
  • Workflows = legacy automation (avoid for new solutions)

A good architect ensures:

  • Clear ownership of logic
  • No duplication
  • No race conditions
  • Predictable execution order
  • High performance
  • Maintainability
Summary: 

The Dataverse execution pipeline orchestrates how business logic runs when data changes occur in Dynamics 365 and the Power Platform. Plugins, classic workflows, and Power Automate flows each play a unique role, and understanding how they coexist ensures predictable, high-performance, and maintainable solutions.

Plugins operate closest to the database and run synchronously or asynchronously within the Dataverse pipeline. They are best suited for real-time validation, complex business logic, and operations requiring transactional consistency. Because plugins execute fastest and support pre/post stages, they are ideal for critical logic that must not fail.

Workflows, although legacy, still serve well for simple asynchronous automation. They run after the database transaction has completed, reducing risk but limiting their use for real-time requirements.

Power Automate interacts with Dataverse externally through events. It is excellent for long-running processes, integrations, approvals, and cross-system actions. However, because it relies on triggers and APIs outside the pipeline, it cannot ensure transactional rollback and is not appropriate for logic requiring real-time enforcement.

A well-architected system uses a pipeline-first strategy, placing essential business rules in plugins, allowing workflows where simplicity is needed, and using Power Automate for integrations or user-facing processes. Following clear rules of engagement avoids duplication, race conditions, and performance bottlenecks while ensuring predictable behavior across the platform.

Published on:

Learn more
Power Platform , D365 CE & Cloud
Power Platform , D365 CE & Cloud

Dynamics 365 CE, Power Apps, Powerapps, Azure, Dataverse, D365,Power Platforms (Power Apps, Power Automate, Virtual Agent and AI Builder), Book Review

Share post:

Related posts

Power Automate: Retiring the Impala connector

The Impala connector will be retired and removed from Copilot Studio, Logic Apps, Power Apps, and Power Automate between April 1-14, 2026. Exi...

1 day ago

Power Automate: Get support for normalized schema import for data ingestion

Customers with existing data pipelines or data products in data mesh mostly want to stick to normalized, efficient forms such as star schema. ...

6 days ago

Power Automate: Export object-centric process mining data to Microsoft Fabric semantic model

Publishing to Microsoft Fabric breaks down data silos and amplifies the impact of your process insights across your organization. Instead of k...

6 days ago

Power Automate: Create and visualize custom KPIs in Process Intelligence Studio

Custom KPIs put your unique business priorities at the center of process analysis. While standard metrics provide valuable baseline insights, ...

6 days ago

Power Automate: Analyze your processes in Process Intelligence Studio

Process Intelligence Studio eliminates the friction between your questions and your answers. Instead of navigating rigid dashboards or using a...

6 days ago

Power Automate: Configure Entra hybrid join for hosted machine groups

Microsoft Entra hybrid join with custom virtual networks (VNETs) and hosted machine groups lets your hosted machine group bots enroll in both ...

6 days ago

Power Automate: Enable version control for desktop flows

With version control in Power Automate for desktop, you can see what changes were made and who made them. This feature makes it easier to debu...

6 days ago

Power Automate: Use Power Platform environment variables in desktop flows

Retrieve Power Platform environment variables directly through their desktop flows without the need to pass them as inputs to the flow. A new ...

6 days ago

Power Automate: Create and edit expressions with Copilot

You can create, edit, and fix your Power Automate expressions by indicating your requirements in natural language. By using this feature to in...

6 days ago

Condition vs. Switch in Power Automate: When to Use Each

A common question I hear from newer Power Automate users is when to use Condition vs Switch in the Control connector. Control is available in ...

10 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy