WJb Docs - Intermediate

Learn workflows, persistence, scheduling, and production-ready patterns.

πŸš€ Start Here
🧩 Mental Model
🌊 Building Workflows
πŸ’₯ Failures & Control
πŸ‘€ Observation & Debugging
πŸ›  Practical Patterns
βœ… Working Examples
➑️ What’s Next

πŸ’‘ What Is WJb?

WJb is an explicit background job framework for .NET.

Instead of hiding workflow transitions behind pipelines, middleware and framework magic, WJb keeps everything visible in code.


The Core Idea

Most systems eventually become:

Job
 ↓
Pipeline
 ↓
Middleware
 ↓
Retry
 ↓
Magic

WJb intentionally stays simple:

Action
 ↓
Result
 ↓
Next Action

If you can read the code, you can understand the workflow.


Building Blocks

Action

An Action is a unit of work.

Examples:

  • Send an email
  • Generate a report
  • Import a file
  • Call an external API

Result

Every Action returns a Result.

The Result tells WJb what should happen next.

Examples:

  • Complete the workflow
  • Continue to another Action
  • Create multiple jobs

Job

A Job represents a scheduled execution of an Action.

Jobs are stored until a Worker executes them.

Worker

A Worker executes jobs.

Workers:

  • Load jobs from the store
  • Execute actions
  • Save results
  • Schedule next jobs

Example Workflow

GenerateReportAction
 ↓
SendEmailAction

The first Action generates a report. The second Action sends the report by email.

The workflow is completely visible in code.


Why WJb?

  • βœ… Explicit workflows
  • βœ… No hidden pipelines
  • βœ… Easy debugging
  • βœ… Easy testing
  • βœ… Provider-neutral design
  • βœ… Works from simple console apps to WASM

Philosophy

WJb follows a simple principle:

Every workflow should be understandable by reading the code.

No hidden transitions. No magic execution flow. No surprises.

An unhandled error has occurred. Reload πŸ—™

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.