workflows.services.executors.approvalยถ

Approval step executor.

Classesยถ

ApprovalExecutor

Approval step executor.

Module Contentsยถ

class workflows.services.executors.approval.ApprovalExecutor[source]ยถ

Bases: workflows.services.executors.factory.AbstractStepExecutor

Approval step executor.

First encounter (no signal) โ†’ AWAITING (AwaitingApproval).

  • On โ€œrejectโ€ โ†’ REJECTED (terminal).

  • On โ€œapproveโ€:
    • If this is the last Approval step โ†’ APPROVED.

    • Otherwise โ†’ PASSED.

do_execute(instance, signal)[source]ยถ

Execute the approval step and return the resulting state.

Parameters:
  • instance (workflows.models.WorkflowInstance) โ€“ Workflow instance being processed.

  • signal (str | None) โ€“ External decision signal such as approve or reject.

Returns:

ExecutorResult describing the new workflow state and step context.

Return type:

workflows.services.types.ExecutorResult