Resources

/

ACP Lab Notes

[Part 42] Adding Two-Step Approval to Database Work

Approvals · Auditing · Operations

November 13, 2026

Database approval may need a development review of SQL and conditions followed by operational review of target and purpose.

 

I implemented that sequence in QueryPie: two SQL Request approval steps, reviewed sequentially by different people, followed by execution. The test SQL read one order’s status and amount.

 

Separating Development Review and Operations Approval

In the administrator’s General → Workflow Management → Approval Rules, I created EP42 - Two-Step SQL Approval for SQL Request.

 

The first approver was Demo Approver for development review. Add Step added a second stage for the operations reviewer Demo Auditor.

 

Screen 1. First approver and added second step in the SQL Request rule.
Screen 1. First approver and added second step in the SQL Request rule.

Both used administrator-defined Select Assignee(s) / Group(s). Demo Developer was executor and Allow Self-Approval Off. Requests follow predefined reviewers rather than requester-chosen names.

 

Screen 2. Demo Auditor as second approver; Demo Developer executes.
Screen 2. Demo Auditor as second approver; Demo Developer executes.

The Review Order Is Visible Before Submission

Selecting the rule in the developer’s request showed Demo Approver, Demo Auditor, and Demo Developer in order, making review and execution responsibility visible upfront.

 

The connection was Two-Step Approval Lab, with SELECT for order 41001. The reason specified development review then operations approval for a single-order read.

 

Screen 3. Both approvers and final executor shown in order.
Screen 3. Both approvers and final executor shown in order.

SQL, database, and reason stayed in one request, reducing separate explanations. The title was ‘Part 42 order lookup — development review, then operations approval’.

 

First Approval Does Not Enable Execution

Demo Approver checked the order condition and table, left a review comment, and approved.

 

The requester saw the first approver green, the second yellow as next, and the executor still waiting.

 

Screen 4. Second reviewer becomes next after first approval.
Screen 4. Second reviewer becomes next after first approval.

The list made this explicit: Approval Status In Progress; Execution Status Pending. The request was not yet in Executions → To Do.

 

Screen 5. Approval remains in progress and execution pending.
Screen 5. Approval remains in progress and execution pending.

Two names are not merely listed: the next approval is required before proceeding to execution.

 

Second Approval Releases the Task for Execution

Demo Auditor reviewed connection, scope, and purpose and left final approval. Each reviewed the same request from a different responsibility.

 

Screen 6. Second reviewer records a comment and final approval.
Screen 6. Second reviewer records a comment and final approval.

After final approval, the developer’s Executions → To Do listed the request. Both approvers were green, executor yellow, and the Execute button became available.

 

Screen 7. Execute available only after both approvals.
Screen 7. Execute available only after both approvals.

I executed the approved SQL. Results showed 1 Rows selected., and the request moved to Done. One workflow made the current responsibility easy to follow.

 

Screen 8. SQL executes after two approvals, returning one row.
Screen 8. SQL executes after two approvals, returning one row.

Two Approvals and Execution Have Separate Records

Finally, in the administrator’s Workflow Logs, searching the title returned submission, first approval, second approval, and execution: four records.

 

Remaining Steps progressed from Approval 1 after submission to Approval 2 after first approval, then Execution after final approval, and Done after execution, with each person and timestamp retained.

 

Screen 9. People and next steps across submission, two approvals, and execution.
Screen 9. People and next steps across submission, two approvals, and execution.

Query Audit also showed Demo Developer’s successful SQL Request execution, connecting approval history to the real database action.

 

The benefit was turning company review order into the actual work procedure. Development and operations approve in sequence before handoff to execution, with progress and evidence for shared database responsibility.

 

This lab used QueryPie Community 11.6.7 and MySQL 8.0.42 with test staff and orders.

 

Reference: Approval Rules · Submitting SQL Requests · Workflow Logs