Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt

Use this file to discover all available pages before exploring further.

APPROVAL steps model an explicit authorization gate in an Activity. Use them when the process must pause until an authorized person or role approves the next move. For production review work today, the most common pattern is still a CREATE_TASK step backed by an approval Task Template and Data Form. Use APPROVAL when you want the Activity Plan to express the approval gate directly.

When to Use APPROVAL

Use APPROVAL for authorization gates such as:
  • Manager approval for invoices above a threshold
  • Compliance approval before a covenant result is finalized
  • Supervisor approval before a claim is accepted
  • Credit approval before a lending packet advances
  • Operations approval before data is posted to a system of record
Use CREATE_TASK instead when the approver needs a full review surface, document correction, multiple fields, or a rich Data Form.

Basic Shape

{
  "slug": "manager-approval",
  "kind": "APPROVAL",
  "dependsOn": ["analyst-review:approved"],
  "config": {
    "approverRole": "finance-manager",
    "approvalCriteria": {
      "amountGreaterThan": 10000,
      "currency": "USD"
    }
  }
}
Config keyDescription
approverRoleRole or responsibility that can approve the gate
approvalCriteriaBusiness criteria that explain why approval is required
dependsOnPrior Activity steps or actions that must complete first

Approval vs Review Task

NeedPrefer
Simple approve or reject gateAPPROVAL
Reviewer edits extracted dataCREATE_TASK
Reviewer needs a Data FormCREATE_TASK
Approval must be visible as a step type in the process modelAPPROVAL
Existing production workflow needs rich human workCREATE_TASK

Common Pattern

The approval gate is separate from the automation. The Activity can show exactly where authorization was required and what happened next.

Criteria Design

Approval criteria should be understandable to the approver and auditable later. Good criteria:
{
  "approvalCriteria": {
    "reason": "Invoice amount exceeds approval threshold",
    "amount": "{{steps.extract.mapped_output.total}}",
    "threshold": 10000,
    "currency": "USD"
  }
}
Weak criteria:
{
  "approvalCriteria": {
    "flag": true
  }
}
Approval criteria should explain the business reason, not just the implementation condition.

Downstream Routing

Downstream steps should depend on explicit approval outcomes.
[
  {
    "slug": "manager-approval",
    "kind": "APPROVAL",
    "dependsOn": ["validate:requires-approval"]
  },
  {
    "slug": "post-approved",
    "kind": "BRIDGE_CALL",
    "dependsOn": ["manager-approval:approved"]
  },
  {
    "slug": "notify-rejected",
    "kind": "BRIDGE_CALL",
    "dependsOn": ["manager-approval:rejected"]
  }
]
Keep approval outcomes small and explicit. Most approval gates need only approved, rejected, and sometimes needs-more-information.

Production Pattern With CREATE_TASK

When the approval requires a full reviewer interface, model it as a Task:
{
  "slug": "manager-approval-task",
  "kind": "CREATE_TASK",
  "dependsOn": ["validate:requires-approval"],
  "config": {
    "taskTemplateRef": "manager-approval",
    "taskStatusSlug": "open",
    "taskData": {
      "approvalReason": "Invoice amount exceeds threshold"
    }
  }
}
This keeps the Activity-first model intact: the Activity owns the process and creates a Task when a person must act.

Checklist

  • The approval gate represents a real business authorization, not a generic pause.
  • The approver role is clear.
  • Criteria explain why approval is required.
  • Downstream steps depend on explicit outcomes.
  • Use CREATE_TASK when the approver needs a full review surface.
  • Approval outcomes are included in audit and reporting expectations.

Create Task Steps

Build rich human review and approval work.

Service Bridge Steps

Post approval results to external systems.