Academy/VCAP — VCF Automation (3V0-21.25)/Lab: Build Event-Driven Approval Workflow
This lab targets VCF 9.0

Lab: Build Event-Driven Approval Workflow

VCF 9.0Intermediatevcap-advanced⏱ 90 min

Objectives

  • Create a multi-step approval workflow using event subscriptions with explicit ordering: quota check (blocking, priority 0) → approval routing (blocking, priority 1) → deployment → CMDB creation (post-provision subscription, with a recovery runnable item for clean-up).

Prerequisites

VCF lab environment deployed and operational

Lab Environment

Standard VCF lab environment for Advanced VCF 9.0 Automation

Tasks

Task 1 Lab: Build Event-Driven Approval Workflow

Create a multi-step approval workflow using event subscriptions with explicit ordering: quota check (blocking, priority 0) → approval routing (blocking, priority 1) → deployment → CMDB creation (post-provision subscription, with a recovery runnable item for clean-up).

Step 1

Create a blocking subscription on the Compute allocation event topic (priority 0) running the ABX action "check-quota"; add a recovery runnable item that records the rejection

Step 2

Configure an Approval Policy (Manage & Govern > Policies) for the catalog item and add a blocking subscription "route-approval" on the same topic with Priority 1 (check-quota keeps Priority 0 — 0 is the highest and runs first; blocking subscriptions with equal priority run in reverse alphabetical order of subscription name, which would run route-approval before check-quota). It posts the pending request to the ServiceNow approval queue; attach a recovery runnable item that removes any partial ServiceNow record if a later subscription fails

Step 3

Create a blocking subscription on the Compute post provision event topic for CMDB record creation — blocking so that the CMDB call runs in priority order before any non-blocking subscriptions receive the event (non-blocking subscriptions run at the same time, with no order among them); set a timeout and add a recovery runnable item that runs if the primary runnable item fails and removes any partial CMDB record, and set the ebs.recover.continuation property on that recovery runnable item to decide whether later subscriptions in the chain still run

Step 4

Test with valid request (quota available, auto-approved) → proceeds to deploy

Step 5

Test with quota exceeded → check-quota (priority 0) fails the request first, so the deployment is rejected and route-approval (priority 1) never runs — approval never reaches ServiceNow. Then swap the priorities once to observe the wrong order

Step 6

Open the Event Log tab on the Event Subscriptions page and the workflow/action run history (nothing needs enabling); confirm check-quota ran before route-approval and note each run's duration (VCF 9.0.1 docs p.5974)

Validation Gate

Check: Verify lab completion

Expected: Lab exercise completed successfully

Common Errors

Approval workflow blocking deployments when approver is unavailable
Fix: Set the approval policy's Auto expiry trigger (a number of days) and Auto expiry decision (Approve or Reject), and name more than one approver with Approver mode Any so one absent approver does not stall the queue (VCF 9.0.1 docs p.5984). Hour-level SLAs and escalation to backup approvers belong in the ITSM tool (for example the ServiceNow approval queue used here). A stuck approval queue blocks all developer deployments.
Not differentiating approval requirements by resource size
Fix: Small deployments (1 VM, 2 vCPU) shouldn't require the same approval as large deployments (10 VMs, 64 vCPU). Configure tiered approvals: auto-approve below threshold, single approver for medium, multi-approver for large.
Event subscriptions not filtering correctly causing excessive triggers
Fix: VCF Automation event broker fires on all matching events. An unfiltered subscription triggers on every VM creation across all projects. Use event filters: project scope, resource type, and action type to limit trigger scope.

Final Validation

Lab completed successfully

✓ All steps completed → No errors observed

Cleanup / Restore

• Revert to snapshot if needed

Design Reflection (VCDX)

Governance automation balances control with agility. VCDX panelists test whether your approval process is operationally sustainable — a process that blocks developers drives shadow IT.

⚠ Known Pitfalls

Requiring approval for every deployment regardless of size — this creates bottlenecks and drives shadow IT.
Not planning for absent approvers (several approvers with Approver mode Any, Auto expiry settings, ITSM escalation) — stuck queues block entire teams.
Was this page useful?
Type to search. ↑ ↓ to move, Enter to open, Esc to close.