Skip to content

Add durable workflow examples (RFC-0022)#94

Open
sanketsudake wants to merge 3 commits into
mainfrom
examples/rfc-0022-workflows
Open

Add durable workflow examples (RFC-0022)#94
sanketsudake wants to merge 3 commits into
mainfrom
examples/rfc-0022-workflows

Conversation

@sanketsudake

Copy link
Copy Markdown
Member

What

Three real business-process examples for the Fission Workflows feature (RFC-0022), under miscellaneous/workflows/, plus their examples.json entries.

Example Business case Features shown
order-pipeline/ E-commerce checkout Task chaining, Parallel fraud/stock screening, Choice routing, retry + backoff, catch on typed errors, resultPath merging
batch-enrichment/ CRM lead scoring Map fan-out with maxConcurrency, ordered join → aggregation
payment-dunning/ Subscription recovery Durable Wait timers, catch-driven routing, run history

Each example is a plain set of Fission functions + a Workflow manifest + deterministic inputs and a README. Functions return JSON objects (the node env body-parser is strict) with business-plausible logic — no stubs.

Verified end to end on a kind cluster

  • order-pipeline — all six inputs reach their expected terminal state: happy → FULFILLED, flaky-gateway → FULFILLED (via retry), declined/high-fraud/out-of-stock/invalid → REJECTED.
  • batch-enrichment — Map over 6 leads joins and aggregates (total: 6, segmented).
  • payment-dunning — valid → RENEWED; past-due → Wait → CANCELLED (catch resultPath preserves the subscription id).
  • Edge matrix — empty/oversized/missing input, cancel mid-Wait, delete-workflow mid-run, ghost function, branch fail-fast (Fission.BranchFailed), a 6-run concurrent burst (all succeed), and controller-restart mid-Wait (durable resume, timer fires exactly once).

Note

The Workflows feature itself is in flight (fission/fission#3587); these examples are its companion and target that feature once released.

🤖 Generated with Claude Code

Three real business processes demonstrating the Fission Workflows feature,
each highlighting a different capability:

- order-pipeline: e-commerce checkout — Task chaining, Parallel fraud/stock
  screening, Choice routing, payment retry with backoff, and catch on typed
  errors with resultPath document merging. Six deterministic inputs, one per
  route (fulfil, retry-then-fulfil, decline, high-fraud, out-of-stock, invalid).
- batch-enrichment: CRM lead scoring — Map fan-out over an array with
  maxConcurrency and an ordered join feeding an aggregation step.
- payment-dunning: subscription recovery — durable Wait timers between charge
  attempts, catch-driven business routing, and run history.

Functions are plain Fission functions (nothing workflow-specific); all return
JSON objects (the node env body-parser is strict) with business-plausible
logic. Each example has a README, a workflow.yaml, and deterministic inputs.
examples.json gains the three entries.

Verified end to end on a kind cluster: all example routes reach their expected
terminal state, including concurrent parallel joins and durable restart-resume.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mergify

mergify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

sanketsudake and others added 2 commits July 17, 2026 17:49
Run operations moved under `fission workflow runs` (list/describe/history/
cancel) so a run name is never mistaken for a workflow name. Update the
example READMEs to the new commands:

  fission workflow runs list --workflow <wf>
  fission workflow runs describe --name <run>
  fission workflow runs history  --name <run>

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`workflow graph --open` draws the diagram in a browser from an ephemeral
local server (the graph never leaves the machine), and
`workflow runs graph --name <run> --open` colors every state by what that run
did — the visual answer to "where did this run stop".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant