Skip to content
← All templates

Runnable workflow template

Form-to-PDF With Outcome Validation

Generate a PDF from a form, validate the artifact, attach it to the source record, and repair failures safely.

Workflow sequence

  1. 01Receive form webhook
  2. 02Validate source fields
  3. 03Render versioned PDF
  4. 04Check size and required text
  5. 05Store with idempotency key
  6. 06Link to source record
  7. 07Notify or repair

Sequence definition

Use this definition as a starting point. Replace handlers with your HTTP workers, validate provider responses, and add credentials through the credential store rather than embedding secrets.

{
  "id": "form_to_pdf_v1",
  "blocks": [
    { "id": "validate", "type": "step", "handler": "validate_form" },
    { "id": "render", "type": "step", "handler": "render_pdf", "retry": { "max_attempts": 3, "backoff": "exponential" } },
    { "id": "verify", "type": "step", "handler": "verify_pdf" },
    { "id": "store", "type": "step", "handler": "store_artifact", "idempotency_key": "{{context.form_id}}:{{context.template_version}}" },
    { "id": "link", "type": "step", "handler": "link_source_record" }
  ]
}

Production controls to keep

Stable idempotency keys around external writes

Explicit validation before the success state

Bounded retries with provider-aware backoff

Searchable source and destination identifiers

A named owner for exhausted retries

A replay test using duplicate input

Run this workflow

Install Orch8, connect the handlers, then test duplicate delivery and worker interruption before production.

Open the quickstart