# `SquidMesh.Workflow`
[🔗](https://github.com/ccarvalho-eng/squid_mesh/blob/main/lib/squid_mesh/workflow.ex#L1)

Declarative workflow contract for Squid Mesh workflow modules.

## Example

    defmodule Billing.InvoiceReminder do
      use SquidMesh.Workflow

      workflow do
        trigger :invoice_delivery do
          manual()

          payload do
            field :account_id, :string
            field :invoice_id, :string
          end
        end

        step :load_invoice, Billing.Steps.LoadInvoice
        step :send_email, Billing.Steps.SendReminderEmail, retry: [max_attempts: 3]

        transition :load_invoice, on: :ok, to: :send_email
      end
    end

The contract defined here captures workflow structure. Validation and runtime
execution behavior are added in subsequent slices.

# `approval_step`
*macro* 

Declares a first-class approval step for manual review decisions.

# `cron`
*macro* 

Declares a cron-based trigger.

# `field`
*macro* 

Declares one payload field inside a trigger payload block.

# `manual`
*macro* 

Declares a manual trigger.

# `manual_review_step`
*macro* 

Declares a manual review step as an alias of `approval_step/2`.

# `payload`
*macro* 

Declares the payload contract for the current trigger.

# `step`
*macro* 

Declares one workflow step.

# `transition`
*macro* 

Declares a transition from one step outcome to the next step.

# `trigger`
*macro* 

Declares a named workflow trigger.

# `workflow`
*macro* 

Declares the workflow body.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
