Workflow sequence
- 01Hash and store source
- 02Extract typed fields
- 03Attach page and source references
- 04Run deterministic validation
- 05Route uncertain fields to review
- 06Publish approved record
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": "document_extraction_provenance_v1",
"blocks": [
{ "id": "archive", "type": "step", "handler": "archive_source" },
{ "id": "extract", "type": "step", "handler": "extract_with_citations" },
{ "id": "validate", "type": "step", "handler": "validate_document_fields" },
{ "id": "review_gate", "type": "router", "routes": [{ "condition": "steps.validate.output.needs_review == true", "blocks": [{ "id": "review", "type": "human_review", "timeout": "P2D" }] }] },
{ "id": "publish", "type": "step", "handler": "publish_approved_record", "idempotency_key": "{{steps.archive.output.sha256}}" }
]
}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