Module: Approval Preconditions

Preconditions let you define on a workflow stage which details a document must have before an approval may take it out of that stage – for example "the cost center is filled in" or "the payment reference is filled in". Advanced Workflow checks these details when someone approves; it does not maintain them. If something is missing, the approver sees what is missing and can add it or reject the document.

Purpose

Setup

  1. Open the AWF Workflow Template and select the stage in the Stages section.
  2. Choose the Preconditions action (or the number in the Preconditions column). The Rules page opens with the preconditions of this stage.
  3. Create a rule with New and give it a condition that describes the desired state, for example field Cost Center, operator Is Not Empty.
  4. In the rule's Approval Precondition section, set the Severity and, if you like, a Message of your own.

{add screenshot of Rules (preconditions of a stage) here}

When you open the preconditions for the first time, the app creates a rule group of their own for the stage (code PRE- + stage code), shown in the stage's Precondition Rule Group field. It is separate from the step rules: step rules are evaluated when a stage is entered, and the first match wins; preconditions are checked when the stage is left, all of them.

A precondition is worded positively: when the rule matches, the precondition is met. If a related record the condition needs does not exist, the precondition is not met.

Rule fields

Header or lines

Whether a precondition concerns the document header or every line follows from its condition: if it checks a field of a line table (for example Purchase Line), each line is checked on its own, and the message names the line. The Record Match Type field is not offered for preconditions.

Checks when the template is activated

The template cannot be activated when

If Allow Record Edit is switched off on the stage, or external approvers approve it, the app points this out when you open the preconditions: the approvers cannot add missing details themselves and can only reject the document so that somebody else completes it.

What is checked when approving

Each approval checks what it stands for – so no line blocks an approver who may not change it:

ApprovalChecked
Header approvalthe document header and the lines that have no approval of their own at this stage
Line approval (related approval)its line
the approval that completes the stageall preconditions of the stage

The "Approval not possible yet" dialog

When you approve and a precondition is not met, the dialog Approval not possible yet - stage … (… open) opens before anything is approved. This applies to Approve on the document and in Requests to Approve, to Approve Line(s) in the document lines and to the Related Approvals FactBox. For each precondition it shows Status (Met, Missing or Warning), Precondition, Message, Line, Field and Current Value.

{add screenshot of Approval not possible yet here}

Where no dialog is possible, the approval ends with the message The approval is not possible yet. Stage … requires: … and the action Show problems, which opens the list of preconditions. There is no way to override a precondition of severity Error – not for administrators either.

Approve All

Approve All skips approvals with an unmet Error precondition and reports them at the end: … approval request(s) were approved. … remain open, … of them because their preconditions are not met: …. Open warnings are confirmed once, up front, for all of them.

The "Approval Preconditions" FactBox

The FactBox appears on the document pages with Advanced Workflow integration, in Requests to Approve and on the AWF Workflow Instance card. It is visible while the workflow is at a stage with preconditions.

{add screenshot of Approval Preconditions FactBox here}

Automatic approvals, external approvers and deleted lines

Copying, exporting, importing

Copy a workflow, Export a template and Import / overwrite a template take the stages' preconditions along – with their conditions and the message translations.

For developers

Add checks of your own through the integration event OnAfterCheckPreconditions of codeunit DXP AWF Precondition Mgmt.. It is raised on every path – dialog, the engine's binding check, external and rule-based approvals. A result marked Partner Check with severity Error that is not met blocks the approval exactly like a precondition rule.


Revision #1
Created 2026-11-16 11:51:56 UTC by Bernd Feddersen
Updated 2026-11-16 11:51:56 UTC by Bernd Feddersen