# Purchase approval swimlane

Generate an editable Visio process map with role lanes, phases, a decision and a revision loop. Includes the VSDX, SVG preview and C# source.

Visio · C# walkthrough

Make ownership changes and the revision path visible in one diagram instead of describing them only in prose.

[Build this report](#example-code)[Download VSDX](/downloads/showcase/workflows/visio-approval-swimlane/example.vsdx)

**Start with**

Approval roles, process steps and labeled transitions

**Generate**

VSDX + SVG

[!\[Generated Visio example: Purchase approval swimlane\](/downloads/showcase/workflows/visio-approval-swimlane/preview.webp)](/downloads/showcase/workflows/visio-approval-swimlane/preview.png)

Generated diagram · Generated by the example below

## How it works

1. ### Define the grid
  
  Declare the requester, budget owner and operations lanes, then add intake, review, decision and fulfilment phases.
2. ### Place the steps
  
  Use typed start, step, decision and end nodes with their lane and phase identifiers.
3. ### Connect the outcomes
  
  Add the approval handoff and an explicit revision path back to review. Reopen the VSDX before rendering PNG and SVG.

## The C# source

The example below shows the document API and layout used for this report. Follow the Visio guide for package setup in your own project.

```csharp
using OfficeIMO.Visio;
using OfficeIMO.Visio.Diagrams;

namespace OfficeIMO.Examples.Showcase.Workflows;

/// <summary>Maps a purchase approval across requester, budget owner and operations with an explicit revision path.</summary>
internal static class ApprovalSwimlane {
    internal static void Create(string folder) {
        var document = VisioDocument.Create(Path.Combine(folder, "example.vsdx"))
            .SwimlaneDiagram("Purchase approval", swim => swim
                .Theme(VisioStyleTheme.Modern())
                .Lane("requester", "Requester").Lane("owner", "Budget owner").Lane("operations", "Operations")
                .Phase("intake", "Intake").Phase("review", "Review").Phase("decision", "Decision").Phase("fulfil", "Fulfil")
                .Start("submit", "Submit request", "requester", "intake")
                .Step("check", "Check need", "owner", "review")
                .Decision("approve", "Approved?", "owner", "decision")
                .Step("revise", "Clarify request", "requester", "decision")
                .Step("order", "Place order", "operations", "decision")
                .End("receive", "Confirm receipt", "operations", "fulfil")
                .Flow("submit", "check", "request").Flow("check", "approve")
                .Exception("approve", "revise", "revise").Handoff("approve", "order", "yes")
                .Flow("revise", "check", "resubmit").Flow("order", "receive"));
        document.Save();
    }
}
```

[Open the C# source file](/downloads/showcase/workflows/visio-approval-swimlane/ApprovalSwimlane.cs.txt)

## API used in this example

- [`VisioDocument`](/api/visio/officeimo-visio-visiodocument/)
- [`VisioStyleTheme`](/api/visio/officeimo-visio-visiostyletheme/)

## Use this in your project

Use stable identifiers for nodes and replace the sample roles with actual owners. Keep exception labels concise so the path stays readable.

The [Visio guide](/docs/visio/diagram-builders/) explains package setup and related document APIs.

## Documents and scope

### What the preview shows

The linked C# example generates this file. The runner reloads the VSDX, checks the authoring model and renders the saved diagram to PNG and SVG.

### What to keep in mind

The VSDX is validated and rendered by OfficeIMO. The preview does not demonstrate editing or routing behavior in desktop Visio.

[Visio API reference](/api/visio/) · [Artifact hashes and provenance](/downloads/showcase/manifest.json)

## Continue with another example

- [Visio**Organisation chart with team vacancies**](/showcase/visio-team-organisation/)
- [Word**An editable decision record**](/showcase/word-decision-record/)

<!-- PowerForge markdown artifact sha256:00B8759E13AF3AE6C70FCAE658561EF266BF6D0B201AFE300EC2C99B283B14B7 -->
