---
id: object/codeunit/1501
type: object
title: Codeunit 1501 "Workflow Management"
summary: Codeunit 1501 "Workflow Management" in Base Application (System.Automation). 24 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 8540cded0a14f9334db151eababf0dcc59c308659156e5dac054532dd67bd345
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/Workflow/WorkflowManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/System/Workflow/WorkflowManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11847
object_type: codeunit
object_id: 1501
name: Workflow Management
namespace: System.Automation
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 46
  events: 5
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 7
  called_by: 23
  implements: 0
---

# Codeunit 1501 "Workflow Management"

> Codeunit 1501 "Workflow Management" in Base Application (System.Automation). 24 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC29.

Base Application · System.Automation · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/Workflow/WorkflowManagement.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | TableData Workflow = R, TableData "Workflow Step" = R, TableData "Workflow Step Instance" = Rimd, TableData "Workflow Table Relation Value" = rimd, tabledata "Workflow Event" = r, TableData "Workflow Event Queue" = rimd, TableData "Workflow Step Argument" = rd, TableData "Workflow - Record Change" =... |

## Events published

- `OnBeforeHandleEventWithxRec(FunctionName: Code[128]; Variant: Variant; xVariant: Variant; var IsHandled: Boolean)` (integration)
- `OnAfterEvaluateCondition(RecRef: RecordRef; xRecRef: RecordRef; ArgumentID: Guid; var WorkflowRule: Record "Workflow Rule"; var Result: Boolean)` (integration)
- `OnFindWorkflowStepInstanceWithOptionalWorkflowStartOnAfterSetWorkflowStepInstanceLoopFi1tersWhenNotStartWorkFlow(RecordRef: RecordRef; var WorkflowStepInstanceLoop: Record "Workflow Step Instance"; FunctionName: Code[128]; StartWorkflow: Boolean)` (integration)
- `OnFindWorkflowStepInstanceWithOptionalWorkflowStartOnAfterSetWorkflowStepInstanceLoopFi1ters(RecordRef: RecordRef; var WorkflowStepInstanceLoop: Record "Workflow Step Instance"; FunctionName: Code[128]; StartWorkflow: Boolean)` (integration)
- `OnAfterSetFilterWorkflowStep(var WorkflowStep: Record "Workflow Step")` (integration)

## Procedures

- `TrackWorkflow(Variant: Variant; var WorkflowStepInstance: Record "Workflow Step Instance")`
- `FindWorkflowStepInstance(Variant: Variant; xVariant: Variant; var WorkflowStepInstance: Record "Workflow Step Instance"; FunctionName: Code[128]): Boolean`
- `CanExecuteWorkflow(Variant: Variant; FunctionName: Code[128]): Boolean`
- `MarkChildrenStatus(WorkflowStepInstance: Record "Workflow Step Instance"; NewStatus: Option)`
- `MarkSiblingStatus(WorkflowStepInstance: Record "Workflow Step Instance"; NewStatus: Option)`
- `UpdateStatus(var WorkflowStepInstance: Record "Workflow Step Instance"; NewStatus: Option; ChildrenStatus: Option; SiblingsStatus: Option)`
- `FindWorkflow(RecRef: RecordRef; xRecRef: RecordRef; FunctionName: Code[128]; var Workflow: Record Workflow): Boolean`
- `WorkflowExists(Variant: Variant; xVariant: Variant; FunctionName: Code[128]): Boolean`
- `ArchiveWorkflowInstance(WorkflowStepInstance: Record "Workflow Step Instance")`
- `FindResponse(var ResponseWorkflowStepInstance: Record "Workflow Step Instance"; PreviousWorkflowStepInstance: Record "Workflow Step Instance"): Boolean`
- `FindEventWorkflowStepInstance(var WorkflowStepInstance: Record "Workflow Step Instance"; FunctionName: Code[128]; Variant: Variant; xVariant: Variant): Boolean`
- `HandleEvent(FunctionName: Code[128]; Variant: Variant)`
- `HandleEventWithxRec(FunctionName: Code[128]; Variant: Variant; xVariant: Variant)`
- `HandleEventOnKnownWorkflowInstance(FunctionName: Code[128]; Variant: Variant; WorkflowStepInstanceID: Guid)`
- `HandleEventWithxRecOnKnownWorkflowInstance(FunctionName: Code[128]; Variant: Variant; xVariant: Variant; WorkflowStepInstanceID: Guid)`
- `ExecuteResponses(Variant: Variant; xVariant: Variant; ActionableWorkflowStepInstance: Record "Workflow Step Instance")`
- `GetTelemetryDimensions(FunctionName: Text; SerializedWorkflowStepInstance: Text; var Dimensions: Dictionary of [Text, Text])` (internal)
- `ChangeStatusForResponsesAndEvents(WorkflowStepInstance: Record "Workflow Step Instance")`
- `EnabledWorkflowExist(TableNo: Integer; EventFilter: Text): Boolean`
- `NavigateToWorkflows(TableNo: Integer; EventFilter: Text)`
- `BuildConditionDisplay(WorkflowStep: Record "Workflow Step"): Text[100]`
- `ClearSupportedCombinations(FunctionName: Code[128]; WFEventResponseCombinationType: Option "Event",Response)`
- `GetWebhookClientLink(ClientId: Guid; ClientType: Text): Text`
- `AnyWorkflowExists(): Boolean`

Plus 17 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 1503 "Workflow Record Management"](../codeunit/1503.md) (2 calls: `ExecuteQueuedEvents → RestoreRecord`, `StoreEventForLaterProcessing → BackupRecord`)
- [Codeunit 1530 "Request Page Parameters Helper"](../codeunit/1530.md) (2 calls: `EvaluateConditionOnTable → ConvertParametersToFilters`, `EvaluateConditionsOnRelatedTables → ConvertParametersToFilters`)
- [Codeunit 1521 "Workflow Response Handling"](../codeunit/1521.md) (1 call: `ExecuteResponses → ExecuteResponse`)
- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (1 call: `EvaluateCondition → FromRecord`)
- [Codeunit 6400 "Flow Service Management"](../codeunit/6400.md) (1 call: `GetWebhookClientLink → GetFlowDetailsUrl`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (1 call: `HandleEventWithxRec → LogUsage`)
- [Page 1501 "Workflow"](../page/1501.md) (1 call: `NavigateToWorkflows → (object)`)

## Called by

- [Codeunit 1520 "Workflow Event Handling"](../codeunit/1520.md) (48 calls: `HandleEventWithxRecAndRefreshRec → HandleEventWithxRec`, `RunWorkflowOnAfterCreateDocFromIncomingDocFail → HandleEvent`, `RunWorkflowOnAfterCreateDocFromIncomingDocSuccess → HandleEvent`, …)
- [Codeunit 1535 "Approvals Mgmt."](../codeunit/1535.md) (23 calls: `CheckCustomerApprovalsWorkflowEnabled → CanExecuteWorkflow`, `CheckCustomerApprovalsWorkflowEnabled → EnabledWorkflowExist`, `CheckGeneralJournalBatchApprovalsWorkflowEnabled → CanExecuteWorkflow`, …)
- [Codeunit 20426 "Qlty. Start Workflow"](../codeunit/20426.md) (4 calls: `StartWorkflowInspectionChanged → HandleEventWithxRec`, `StartWorkflowInspectionCreated → HandleEvent`, `StartWorkflowInspectionFinished → HandleEvent`, …)
- [Codeunit 1541 "Workflow Webhook Events"](../codeunit/1541.md) (3 calls: `HandleOnCancelWorkflow → HandleEvent`, `HandleOnContinueWorkflow → HandleEvent`, `HandleOnRejectWorkflow → HandleEvent`)
- [Codeunit 20425 "Qlty. Workflow Approvals"](../codeunit/20425.md) (3 calls: `HandleOnApproveTheApprovalRequestOnApproveTimeCardApproval → HandleEventOnKnownWorkflowInstance`, `RunWorkflowOnDelegateTimeCardApproval → HandleEventOnKnownWorkflowInstance`, `RunWorkflowOnRejectTimeCardApproval → HandleEventOnKnownWorkflowInstance`)
- [Codeunit 6279 "Sust. Approvals Mgmt."](../codeunit/6279.md) (2 calls: `CheckSustJournalBatchApprovalsWorkflowEnabled → CanExecuteWorkflow`, `IsSustJournalBatchApprovalsWorkflowEnabled → CanExecuteWorkflow`)
- [Codeunit 6280 "Sust. Workflow Event Handling"](../codeunit/6280.md) (2 calls: `RunWorkflowOnCancelSustJournalBatchApprovalRequest → HandleEvent`, `RunWorkflowOnSendSustJournalBatchForApproval → HandleEvent`)
- [Page 21 "Customer Card"](../page/21.md) (2 calls: `SetWorkFlowEnabled → AnyWorkflowExists`, `SetWorkFlowEnabled → EnabledWorkflowExist`)
- [Page 256 "Payment Journal"](../page/256.md) (2 calls: `OnAfterGetCurrRecord → EnabledWorkflowExist`, `SetApprovalStateForBatch → EnabledWorkflowExist`)
- [Codeunit 1521 "Workflow Response Handling"](../codeunit/1521.md) (1 call: `ExecuteResponse → GetTelemetryDimensions`)
- [Codeunit 1536 "Approvals Journal Line Request"](../codeunit/1536.md) (1 call: `OnRun → CanExecuteWorkflow`)
- [Page 22 "Customer List"](../page/22.md) (1 call: `SetWorkflowManagementEnabledState → EnabledWorkflowExist`)
- [Page 255 "Cash Receipt Journal"](../page/255.md) (1 call: `SetApprovalStateForBatch → EnabledWorkflowExist`)
- [Page 30 "Item Card"](../page/30.md) (1 call: `OnInit → EnabledWorkflowExist`)
- [Page 31 "Item List"](../page/31.md) (1 call: `SetWorkflowManagementEnabledState → EnabledWorkflowExist`)
- [Page 39 "General Journal"](../page/39.md) (1 call: `SetApprovalStateForBatch → EnabledWorkflowExist`)
- [Page 6219 "Sustainability Journal"](../page/6219.md) (1 call: `SetApprovalStateForBatch → EnabledWorkflowExist`)
- [Table 1504 "Workflow Step Instance"](../table/1504.md) (1 call: `MoveForward → UpdateStatus`)
- [Table 1507 "Workflow Step Buffer"](../table/1507.md) (1 call: `UpdateCondition → BuildConditionDisplay`)
- [Table 1520 "Workflow Event"](../table/1520.md) (1 call: `OnDelete → ClearSupportedCombinations`)
- [Table 1521 "Workflow Response"](../table/1521.md) (1 call: `OnDelete → ClearSupportedCombinations`)
- [Table 233 "Item Journal Batch"](../table/233.md) (1 call: `SetApprovalStateForBatch → EnabledWorkflowExist`)
- [Table 245 "Requisition Wksh. Name"](../table/245.md) (1 call: `SetApprovalStateForWkshBatch → EnabledWorkflowExist`)

## Recent changes

- 2026-09-25 [#11847 Use matching key for workflow event step instance lookup](../../changes/bcapps/11847.md) (main, BC30, performance)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC29

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Workflow Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
