Create a Multi-Step Approval Workflow to Finish a Quality Inspection Test

Skip to main content

Create a Multi-Step Approval Workflow to Finish a Quality Inspection Test

You are here:

Use this workflow when a Quality Inspection test must be reviewed and approved by more than one person before it can be finished. The pattern follows Business Central’s standard approval workflow model: request approval when the test grade is set, route the request through a workflow user group, and finish the test only after the last approver approves.

This article walks through set up, similar to Microsoft’s Example of creating a workflow using existing events.

Overview

What happens:

  1. You have an Open test set to PASS or FAIL for the Grade Code.
  2. The workflow creates an approval request for a workflow user group and notifies the first approver.
  3. Each intermediate approver approves, and the workflow sends the request to the next approver.
  4. When Pending Approvals reaches 0, the workflow runs Finish the Quality Inspection Test.

Before you begin

  1. Navigate to the Quality Inspector Setup in Business Central.
  2. Set Workflow Integration to Enable Workflow Integration.
  3. Navigate to the Workflows page to trigger the population of Quality Inspector workflow events and responses.

Step 1: Set up approval users and a workflow user group

You must configure who can submit approval requests and who can approve them before you build the workflow.

  1. Set up Approval User Setup for each participant (requestors and approvers; see Microsoft’s Set Up Approval Users page).
  2. Create a Workflow User Group (e.g., code QI_APPROVERS) and add members with Sequence No. values that define the approval order:
    • Use different sequence numbers (1, 2, 3, …) for a chain of approvers who must each approve in order.
    • Use the same sequence number for multiple users when any one of them may approve that step.

See Microsoft’s How to set up workflow users page.

Step 2: Enable workflow event–response combinations

Business Central only allows event and response pairs that you explicitly enable.

  1. Navigate to the Workflow Event/Response Combinations page.
  2. Enable the following combinations:
    1. Quality Inspection Request is approved: Enable this response for the event Quality Inspection Request is approved (sends approval request for the record and create a notification).
    2. A Quality Inspection Test has changed: Enable these responses for the event A Quality Inspection Test has changed (creates an approval request for the record using approver type <%1> and <%2>; sends approval request for the record and create a notification).

Step 3: Create the workflow

  1. Navigate to the Workflows page.
  2. Select the New Workflow from Template dropdown /  New.
  3. Fill in the fields on the workflow header:
    1. Code: QI-FINISH (example)
    2. Description: Multi-approval finish for graded tests (example)
  4. Configure the workflow steps below, and use Increase Indent on the line menu so child steps sit under the correct parent event, as described in Microsoft’s Create approval workflows.

Step 3a: Entry point: An open Quality Inspection test is fully completed

The workflow triggers when an open Quality Inspection test is changed, and its status is either PASS or FAIL. This would trigger the first time the test grade changes from IN PROGRESS (when all test line values are completed) and when any test line value is subsequently changed.

Create the first workflow line with the following fields:

  • When Event: A Quality Inspection Test has changed
  • On Condition Status: Open
  • Grade Code: PASS/FAIL
  • Then Response: Add the following responses (using Add More Responses):
    • Create an approval request for the record using approver type <%1> and <%2>:
      • Approver Type: Workflow User Group
      • Workflow User Group: your group code (e.g., QI_APPROVERS)
      • Due Date Formula (as needed)
      • Delegate After (as needed)
      • Other approval options (as needed)
    •  Send approval request for the record and create a notification.
    • (Optional) Show message “%1”: Set to “Approval request has been sent.” to inform the requestor.

Step 3b: Intermediate approval (more approvers remain)

Add a new line below the entry step:

  1. Set When Event to Quality Inspection Request is approved.
  2. Increase the indent once so this step is nested under the entry event.
  3. Set On Condition to Pending Approvals: >0.
  4. Set Then Response to Send approval request for the record and create a notification.

This step runs when an approver approves but additional approvers in the chain still must act.

Step 3c: Final approval (finish the test)

Add another line:

  1. Set When Event to Quality Inspection Request is approved.
  2. Increase Indent twice, so this step is nested under the intermediate step (two levels below the entry event).
  3. Set On Condition to Pending Approvals:0.
  4. Set Then Response to Finish the Quality Inspection Test.

This step runs when the last required approver has approved.

Step 3d: Rejection and delegation (optional)

Add steps for other outcomes:
  1. When Quality Inspection Request is rejected (sibling to the approved steps; indent to match other alternatives at the same level):
    • Always: Add responses appropriate to your process. Common options include responses such as Reject the approval request for the record and create a notification.
  2. When Quality Inspection Request is delegated:
    • Always: Send approval request for the record and create a notification.
  3. Set the workflow to Enabled when the setup is complete and tested.

Test the workflow

  1. Open an open Quality Inspection test and input results to cause the test to PASS or FAIL (confirm an approval request is created and the first approver receives a notification).
  2. Sign in as each approver in sequence and approve the request.
  3. Confirm the test Status is now Finished.
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Table of Contents
Go to Top