Introducing a new way to review your PRs.

Read the announcement

open-metadata / openmetadata

The Open Context Layer for Data and AI , OpenMetadata is the open platform for building trusted data context and business semantics for humans, AI assistants, and agents.

View on GitHub

26 documents · Updated Nov 23, 2026

docs / governance-workflow-automation

Governance workflow automation

Governance workflow automation is the server-side system for moving metadata entities through controlled lifecycle stages and for holding selected edits until review. A workflow reacts to entity events, schedules, or a submitted change request, checks scope, assigns stage ownership, and applies the result through entity updates, external actions, or rollback. It is part of the metadata platform service and relates to service API resources, metadata entity lifecycle, and platform security governance.

Workflow definitions

A workflow definition is a named governance process with one trigger, a set of stages, and paths between those stages. The definition connects lifecycle policy to a runtime process and can also declare the stage that it owns for matching entities.

The workflow graph uses these main concepts:

ConceptPurpose
TriggerStarts the process for an entity event, a scheduled batch, an explicit run, or a submitted change request.
NodeRepresents a user stage, an automated check or action, a start or end point, or a decision gateway.
EdgeSelects the next stage. A condition can use the result of the current stage.
Workflow ownerIdentifies who owns the workflow definition. It is separate from ownership of the governed entity.
Stage ownerIdentifies the active workflow that controls an entity lifecycle stage.
Approval modeDetermines whether an event workflow runs after publication or holds a matching edit for review.

The server validates stage inputs and graph reachability before it creates the runtime process. A workflow can also be marked as a lifecycle playbook so lifecycle controls can identify the governing process. A direct-start workflow passes a caller's task and workflow context into the main process without adding another scope check.

Workflow definitions can state whether a node handles entities one at a time or needs the context of a whole batch. The runtime uses that choice when it builds checks, metadata collection, and other automated actions.

References: openmetadata-service/…/MainWorkflow.java• L40-89 openmetadata-service/…/MainWorkflow.java• L103-245 openmetadata-service/…/Workflow.java• L60-101 openmetadata-service/…/EntityStatusWorkflows.java• L83-100 openmetadata-service/…/NoOpTrigger.java• L32-141 openmetadata-spec/…/workflowDefinition.json• L33-123

Trigger evaluation

Triggers decide when a workflow may start and which entity supplies its input. The trigger path runs before the lifecycle stages, so a workflow can reject an out-of-scope change without creating an approval task.

TriggerWorkflow start
Event-based entityA created or updated event for one or more entity types.
Periodic batch entityA schedule fetches matching entities in batches.
No-opAnother server action starts the workflow directly.
Change request hookA field-gated edit signals the workflow that accepted the held change.

For event-based workflows, the event consumer accepts supported create and update events. It ignores governance-bot changes and skips an event when the entity no longer exists. An automation-provider creation remains eligible for review because it is different from a governance-bot write. Accepted events carry the entity link, stable entity ID, event user, event type, and version produced by the event. The stable ID keeps later stages tied to the same entity after a rename or move.

Event triggers can require selected changed fields or ignore excluded fields. They also apply an entity-type filter. A filter is an exclusion rule: a true match keeps the entity out of the workflow, while a false or invalid rule does not exclude it. The same entity-type and default-filter model applies to scheduled batches.

When a trigger accepts an entity, it passes the entity link and stable ID into the main workflow. A batch trigger can process entities one at a time or pass the full batch to an action that needs batch context. A direct-start trigger also forwards task identity, assignees, review settings, and workflow-definition context so an API-created task can enter the same main workflow as an event-driven task.

References: openmetadata-service/…/WorkflowEventConsumer.java• L46-125 openmetadata-service/…/WorkflowEventConsumer.java• L133-306 openmetadata-service/…/TriggeringChange.java• L22-61 openmetadata-service/…/EventBasedEntityTrigger.java• L162-326 openmetadata-service/…/WorkflowTriggerFilters.java• L43-154 openmetadata-service/…/TriggerEntityFilter.java• L25-115 openmetadata-service/…/NoOpTrigger.java• L104-139

Approval-gated edits

Approval-gated edits are human changes that a workflow holds before publication. An active event workflow in Enforce approval mode contributes field and entity rules. The gate and the later trigger use the same include, exclude, and entity-filter semantics so a held edit reaches the workflow that owns it.

Admission rules

The admission gate compares the stored entity with the proposed result of the write. When a governed field changes, it diverts the whole proposed edit into a change request instead of publishing it. Structural identity fields do not create a hold, while custom properties are matched by their individual names. A change that touches fields governed by different workflows is rejected as ambiguous and must be submitted separately.

The gate keeps PUT, PATCH, and import operations consistent with normal publication. It validates lifecycle-stage moves and mutually exclusive tags before review. Governance-generated writes proceed without creating another hold. Bulk responses identify held items separately from applied items. Native ontology definitions use an immutable ontology release as the approval unit rather than this field gate.

References: openmetadata-service/…/ApprovalGate.java• L54-90 openmetadata-service/…/ApprovalGate.java• L158-185 openmetadata-service/…/ApprovalGate.java• L270-325 openmetadata-service/…/ApprovalGate.java• L518-531 openmetadata-service/…/GovernanceApprovalRegistry.java• L36-47

Approval rule resolution

The approval registry turns matching workflow definitions into a shared snapshot of gating rules. A rule includes the target entity type, selected fields, and the entity-specific exclusion filter. Local workflow changes invalidate the snapshot. Other servers detect changes through a workflow-definition epoch. If rules cannot be resolved, the write fails closed rather than publishing without governance.

Suspending an approval workflow stops new edits from being held by that workflow. Existing change requests remain open until the workflow resumes or an administrator ends them.

References: openmetadata-service/…/GovernanceApprovalRegistry.java• L68-135 openmetadata-service/…/GovernanceApprovalRegistry.java• L146-231 openmetadata-service/…/WorkflowTriggerFilters.java• L27-34

Change request lifecycle

A change request is the durable record of an edit held for approval. It stores the entity, requester, owning workflow, current revision, proposed mutation operations, review decisions, application results, conflicts, and ordered lifecycle events.

Request creation

The server creates the request while holding the entity at the version seen by the requester. A revision normalizes field replacements and list changes into mutation operations and records a digest for that exact set of changes. A later edit by the same requester supersedes the active revision, carries forward still-open changes, and restates them against the current published entity.

The request remains linked to one workflow. A new edit that matches a different approval workflow cannot silently join the first review.

References: openmetadata-service/…/ChangeRequestService.java• L68-89 openmetadata-service/…/ChangeRequestService.java• L716-828 openmetadata-service/…/MutationPlanner.java• L38-119 openmetadata-service/…/StagedChange.java• L20-29

Review delivery

After the request commits, delivery signals the hook workflow for its entity type and workflow name. The signal carries the entity link, immutable entity ID, requester, request ID, and active revision number. A lease prevents concurrent deliverers from starting the hand-off twice. Retries use backoff, and a recovery scan retries due deliveries or applies approved requests left behind by a process failure.

After the retry limit, the request enters an attention-required delivery state. If the workflow definition no longer exists, open requests for it are cancelled.

References: openmetadata-service/…/ChangeRequestDelivery.java• L38-123 openmetadata-service/…/ChangeRequestRecoveryScheduler.java• L24-69 openmetadata-service/…/ChangeRequestKeys.java• L21-45 openmetadata-service/…/ChangeRequestService.java• L658-664

Request states

The request state describes the whole request. The active revision and its mutation operations describe each change. Partial review can keep the request pending while some changes are ready to publish and others still wait.

StateMeaning
PendingReview is active, or an approved part still waits for safe application.
ApprovedReview ended with eligible changes ready for application.
AppliedAt least one approved change was published and no open change remains.
RejectedNo change was published and the review rejected the request.
ConflictedCurrent entity values prevent the revision from applying as submitted.
Withdrawn, cancelled, or supersededThe request ended without a new review continuing on that revision.

Each status change records the prior status, new status, revision, actor, reason, and time as an ordered lifecycle event.

References: openmetadata-service/…/ChangeRequestLifecycle.java• L23-67 openmetadata-service/…/ChangeRequestService.java• L301-317 openmetadata-service/…/ChangeRequestService.java• L674-714

Lifecycle stages

Lifecycle stages are the human decision points in a governance workflow. A stage can wait for approval, expose named transitions, and carry the stage status shown to users.

An approval stage can define:

  • A stage identifier and display name.
  • Allowed transitions such as approve or reject.
  • A target status and resolution for each transition.
  • A single-reviewer or multi-reviewer threshold.
  • An optional expiry path for time-based closure.
  • Whether reviewers can decide individual changes while the request remains open.

Edges connect the stage result to the next node. One approval can therefore lead to a status update on approval and to rollback or rejection on refusal. Approval stages are represented as durable Task entities and link back to the workflow instance, so the user-facing task and runtime stage describe the same decision.

An expiry timer needs exactly one safe duration or date variable and a transition. The workflow fails during construction when that contract is invalid, rather than leaving a task open without a path. Approval entry resolves assignees and creates the task synchronously in the current request path. This lets a caller observe the new stage and assignees after task resolution without racing a later runtime job.

References: openmetadata-spec/…/userApprovalTask.json• L35-168 openmetadata-spec/…/edge.json• L7-29 openmetadata-service/…/UserApprovalTask.java• L197-220 openmetadata-service/…/UserApprovalTask.java• L394-474 openmetadata-service/…/CreateTask.java• L148-253 openmetadata-service/…/CreateTask.java• L547-680

Approval decisions

Approval decisions are durable catalog records that authorize which revision changes may be published. The process engine routes the task result, but it does not by itself authorize the entity write. The same task model also carries review decisions for ontology releases.

Reviewer decisions

A reviewer decision names the exact revision and may cover the full revision or selected changes. Approval and rejection thresholds count distinct reviewers. With partial decisions enabled, agreed changes can publish while the remaining changes stay on the same review task.

The requester cannot approve their own request, and review through impersonation is forbidden. A repeated submission of the same per-change vote is a safe retry. An approval is accepted only when its approved operations still pass current-entity checks.

References: openmetadata-service/…/ApprovalDecisionService.java• L50-147 openmetadata-service/…/ApprovalDecisionService.java• L472-525 openmetadata-service/…/ChangeSelection.java• L31-103

Assignee resolution

Stage ownership determines who can act on a pending approval. Explicit reviewers and assignees supplied by the task take precedence. When they are absent, the workflow resolves configured candidates, entity reviewers, supported inherited reviewers, owners, domain owners, users, and team members. Teams expand to their users before the task is created.

Owner cascading is an optional fallback for a stage whose resolved set is empty after requester removal. It checks the governed entity's service owners first. If no user remains, it checks the owners of the entity's domains. This gives a task a wider ownership path without replacing explicit task assignees.

The requester is removed to prevent self-approval. If no usable assignee remains, the node can assign platform administrators, leave the task unassigned, or auto-approve according to its empty-assignee strategy. Workflow-managed tasks do not silently auto-approve when the requester is the only possible reviewer.

References: openmetadata-service/…/SetApprovalAssigneesImpl.java• L97-200 openmetadata-service/…/SetApprovalAssigneesImpl.java• L203-269 openmetadata-service/…/SetApprovalAssigneesImpl.java• L278-285 openmetadata-service/…/OwnerCascade.java• L12-56 openmetadata-service/…/UserApprovalTask.java• L179-203

Ontology release reviews

Ontology release reviews use the normal approval task and workflow lifecycle while treating the whole release as the review target. A caller cannot submit one native ontology definition on its own; the review must name the ontology release that contains the revision.

The review keeps its target and approval rule fixed while it is active. A decision receipt records the task, target, resolution, reviewer, voters, transition, comment, and per-vote details. A recovery process reconciles a committed decision with the task and cleans up stale work after a restart or process failure.

References: openmetadata-service/…/OntologyApprovalWorkflow.java• L35-125 openmetadata-service/…/OntologyApprovalWorkflow.java• L126-199 openmetadata-service/…/OntologyWorkflowDecision.java• L14-60 openmetadata-service/…/OntologyReviewReconciler.java• L73-144

Stage ownership

Stage ownership determines which active workflow controls lifecycle-stage writes for an entity. A workflow owns a stage only when it is deployed, not suspended, starts on the entity type, matches the entity filter, and contains a node that sets the lifecycle stage. The workflow engine is the source of active ownership.

A stage-setting approval, rollback, glossary-term status action, or status attribute action can establish ownership. If several active workflows apply to one entity, the server selects the first applicable workflow by name. The selected workflow also identifies the lifecycle playbook. If the workflow engine is down, no workflow owns the stage.

The server uses the entity's immutable ID when it resolves an entity during a workflow and falls back to the entity link for older in-flight runs. This prevents a rename from breaking an approval or automated attribute action.

References: openmetadata-service/…/EntityStatusWorkflows.java• L60-146 openmetadata-service/…/EntityStatusWorkflows.java• L203-233 openmetadata-service/…/StageOwnership.java• L7-18 openmetadata-service/…/WorkflowTriggerFilters.java• L76-154 openmetadata-service/…/Workflow.java• L12-41

Automated actions

Automated actions apply a workflow result to the governed entity or to a connected service. They run after a trigger or human transition selects the path, which keeps policy decisions separate from the side effects that enforce them.

Action groupGovernance effect
Attribute and status updatesSet an entity field or lifecycle status while preserving the acting-user context when one exists.
Automated checksTest change descriptions, entity attributes, or data completeness and route the workflow from the result.
Metadata collectionKeep one task for missing fields and unmet conditions of an entity's current lifecycle stage.
RollbackRestore the latest durable approved version or mark the current version rejected when no approved baseline exists.
Feedback reviewReject recognizer feedback with the review actor and comment supplied by the workflow.
External and platform actionsSend an entity to a registered sink, start service ingestion, or run a supported application in single-entity or batch mode.
Held-change resolutionPublish agreed mutation operations or discard rejected operations from a change request.

Change-description checks use the triggering version for an event run and the pending revision for a change-request run. Attribute checks apply rules to entity data. Completeness checks return a score and named quality band for edge routing.

Metadata collection is a stage task for entities that must supply required metadata before they can leave a lifecycle stage. It reports missing fields and unmet conditions, assigns the task to configured candidates, and closes when the entity leaves the stage. The stage gate still decides whether the entity advances.

Rollback searches earlier entity versions for the most recent durable approved baseline. If it finds one, it restores that version. If it does not, it marks the current version rejected. The workflow records the source and target versions so later stages can route or report the result.

References: openmetadata-service/…/CheckChangeDescriptionTaskImpl.java• L42-189 openmetadata-service/…/CheckEntityAttributesImpl.java• L38-108 openmetadata-service/…/DataCompletenessImpl.java• L35-112 openmetadata-service/…/MetadataCollectionService.java• L50-164 openmetadata-service/…/RollbackEntityImpl.java• L94-123 openmetadata-service/…/RollbackEntityImpl.java• L180-303

Workflow execution

The server turns a definition into a trigger process and a main lifecycle process. The trigger process handles event, schedule, or change-request signals, then starts the main process with the accepted entity and its workflow variables.

The normal flow is:

flowchart LR
    A[Entity edit or event] --> B{Approval gate}
    B -->|not gated| C[Trigger evaluation]
    B -->|gated human edit| D[Change request]
    D --> E[Workflow hook signal]
    C -->|in scope| F[Main workflow]
    E --> F
    C -->|out of scope| G[No workflow run]
    F --> H[Lifecycle stage]
    H --> I[Approval, check, or metadata task]
    I --> J[Status update, held-change apply, sink, or rollback]
    J --> K[Next stage or end]

The process engine records a workflow instance for the run and a time-series state for each stage. Nodes read and write variables in named input namespaces, which lets a node use global context or a specific earlier node. Approval entry resolves assignees and creates the user-facing task synchronously so the response reflects the new stage before later work continues.

Signals and task resolutions use fresh reads because filters and stage actions decide whether a write or approval can continue. Multi-reviewer tasks record distinct votes and remain open until a threshold is met. Transient database conflicts are retried without hiding failures from other subscribers.

References: openmetadata-service/…/TriggerWorkflow.java• L10-22 openmetadata-service/…/MainWorkflow.java• L29-100 openmetadata-service/…/Workflow.java• L12-57 openmetadata-service/…/WorkflowVariableHandler.java• L35-67 openmetadata-service/…/UserApprovalTask.java• L197-220 openmetadata-service/…/WorkflowSignalDispatcher.java• L58-214

Workflow administration

Workflow definitions are managed as governed resources rather than hidden runtime jobs. The server exposes create, update, version, validation, deployment, trigger, suspend, resume, delete, and restore operations. Authorization applies to definition changes and execution data.

Suspension stops new executions without changing the definition. Redeployment publishes replacement runtime versions before it drains old inactive versions. Deletion removes runtime deployments and running work and cancels open change requests tied to that definition. Execution and stage resources provide time-windowed views that can be filtered by workflow name or entity link.

References: openmetadata-service/…/WorkflowDefinitionResource.java• L58-75 openmetadata-service/…/WorkflowDefinitionResource.java• L206-237 openmetadata-service/…/WorkflowDefinitionResource.java• L541-757 openmetadata-service/…/WorkflowHandler.java• L482-606 openmetadata-service/…/WorkflowInstanceResource.java• L37-127 openmetadata-service/…/WorkflowInstanceStateResource.java• L37-176

Change request visibility

Change request visibility follows both entity access and review responsibility. A caller must be allowed to view the entity. Administrators, entity owners, and entity reviewers can see all requests on it, while other users see their own requests or requests whose tasks they may resolve.

References: openmetadata-service/…/ChangeRequestVisibility.java• L38-71 openmetadata-service/…/ChangeRequestVisibility.java• L73-114 openmetadata-service/…/ChangeRequestVisibility.java• L117-171

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep approval-gate selection aligned with the event trigger's hook mode and deployment state.
  • Keep include, exclude, entity-specific filter, and exclusion semantics identical in the approval gate and trigger filter.
  • Keep the triggering event version aligned with the change description used by trigger filters and automated checks.
  • Keep automation-provider creation events distinct from governance-bot writes.
  • Keep direct-start variables aligned with task metadata and the main workflow's expected start variables.
  • Keep mutation targets, revision digests, approval decisions, applications, and conflict checks tied to the same revision.
  • Keep reviewer thresholds aligned between catalog decisions, task resolution, held-change resolution, and edge results.
  • Keep requester, impersonator, governance-bot, and reviewer identity rules aligned across admission, assignee resolution, review, and entity writes.
  • Keep explicit task assignees ahead of workflow-derived candidates and keep team expansion consistent across both paths.
  • Keep owner cascading limited to the configured empty-assignee fallback and preserve its service-before-domain order.
  • Keep empty-assignee behavior aligned with workflow-managed tasks so requester-only reviews do not auto-approve.
  • Keep task-stage persistence and synchronous approval entry aligned with client-visible transitions.
  • Keep delivery leases, retry states, recovery scans, workflow deletion, and task termination aligned so a request cannot remain silently held.
  • Keep workflow instance and stage-state identifiers aligned with the business key and execution ID used for audit views.
  • Keep metadata completion and revision task identity tied to the entity, workflow, node, and stage.
  • Keep stage ownership aligned with deployment, suspension, trigger filters, readable node types, lifecycle-playbook flags, and lifecycle-stage writes.
  • Keep rollback's approved-baseline rules aligned with the status transition and reviewer history that make a version safe to restore.

Important failure modes

TriggerConsequenceGuard
Approval rules cannot be resolvedThe write fails instead of publishing without a gate.Restore workflow-definition access and retry the write.
One edit matches fields governed by different workflowsThe edit is rejected as ambiguous and no change request is created.Split the edit or use one governing workflow.
The gate and trigger use different field or filter semanticsAn edit can be held without a workflow that can review it, or a workflow can fire with no held change.Change both paths through WorkflowTriggerFilters.
A delayed event run reads only the entity's current changeThe workflow judges a later edit instead of the event that started it.Preserve the event version and resolve that version's change description.
A held request has no active listener for its workflow signalDelivery retries and eventually enters attention required.Deploy or resume the owning workflow, then requeue delivery.
A reviewer resolves an old revision or an ended requestThe decision is rejected and the task must be reloaded or closed.Stamp the exact revision in the task payload and verify it during review.
The entity changed after submissionThe request stays open with conflicts and the revision is not applied.Submit an updated revision after reviewing the current entity.
Owner cascading finds no service or domain usersThe task follows its configured empty-assignee strategy.Configure eligible owners or use the administrator fallback.
The requester is the only possible reviewerA workflow-managed task must not silently approve itself.Remove the requester and keep the task assigned, unassigned, or on its configured fallback path.
A task-provided assignee is lost during resolutionA direct-start task can change ownership unexpectedly.Preserve explicit task reviewers and assignees before deriving candidates.
A workflow engine is down or a definition is unreadableNo workflow owns the entity stage, or the definition is skipped.Restore the engine or deploy a definition the server can read.
A webhook or external pipeline fails after retriesThe automated action reports failure and follows its failure path.Validate the service, endpoint, response handling, and retry settings.
No durable approved baseline exists for rollbackThe current entity version is marked rejected instead of being restored.Record approval transitions before relying on rollback.
A process failure interrupts delivery or applicationRecovery must retry delivery or reapply an idle approved request.Monitor delivery and pending-request recovery.
A task row is visible before its runtime task is committedA client can submit a transition that the workflow engine cannot resolve.Keep approval entry synchronous through task creation.

Key files

FileWhy to read it
openmetadata-spec/…/workflowDefinition.jsonDefines the public shape of a workflow definition, including triggers, nodes, edges, deployment, and suspension state.
openmetadata-spec/…/userApprovalTask.jsonDescribes lifecycle stages, ownership inputs, thresholds, transitions, partial decisions, and expiry behavior.
openmetadata-service/…/Workflow.javaDefines shared variables and result values that connect triggers, tasks, and automated actions.
openmetadata-service/…/WorkflowTriggerFilters.javaDefines shared field-selection and exclusion-filter semantics for triggers and approval gates.
openmetadata-service/…/GovernanceApprovalRegistry.javaShows how active Enforce workflows become field-gating rules.
openmetadata-service/…/ChangeRequestService.javaShows request creation, revisions, conflicts, status changes, and cleanup.
openmetadata-service/…/ApprovalDecisionService.javaShows how exact-revision reviewer decisions authorize whole or partial changes.
openmetadata-service/…/EntityStatusWorkflows.javaShows which deployed workflows own lifecycle-stage writes and how filters select an owner.
openmetadata-service/…/MainWorkflow.javaShows graph validation, batch mode, node assembly, and runtime error paths.
openmetadata-service/…/UserApprovalTask.javaShows approval-stage assembly, synchronous task entry, expiry behavior, held-change resolution, and task routing.
openmetadata-service/…/SetApprovalAssigneesImpl.javaShows how explicit assignees, reviewers, owners, cascaded owners, requesters, teams, and administrators become assignees.
openmetadata-service/…/OwnerCascade.javaDefines the service-owner then domain-owner fallback used when an approval has no usable assignee.
openmetadata-service/…/CreateTask.javaShows how a stage becomes a durable Task and how task data follows runtime commit.
openmetadata-service/…/RollbackEntityImpl.javaShows how rollback restores an approved baseline or rejects the current version.
openmetadata-service/…/MetadataCollectionService.javaShows the one-task-per-entity-and-stage model for missing metadata.