workflows.services.executors.approvalΒΆ

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