WJb Store Examples & Demos

Explore SQL Server, PostgreSQL, MySQL, SQLite, and IndexedDB integrations with persistence and workflow state management examples.

Browser Store Providers
SQL Store Providers

🗄️ SQL Server

Run WJb on Microsoft SQL Server using the official WJb.SqlServer store provider.

SQL Server gives you durable, transactional persistence for jobs, workflows, execution history, monitoring data, actions and service configuration — while keeping the exact same programming model as every other WJb store.

The WJb Monitor Demo runs identically on SQL Server. Only the store registration changes.

Why SQL Server?

  • Enterprise-grade, battle-tested database platform
  • Excellent tooling and administration experience (SSMS, Azure Data Studio, etc.)
  • Strong transactional guarantees and reliability
  • Perfect for both development and production
  • Seamless integration with existing Microsoft infrastructure
Ideal when your team already uses SQL Server or needs maximum enterprise readiness.

What Is Stored?

The WJb.SqlServer store persists everything the Monitor needs:

  • Jobs and their current state
  • Workflow transitions
  • Full execution history
  • Monitoring and progress data
  • Action definitions
  • Service configuration
All of this becomes immediately available in the monitoring dashboard.

How It Works

1. Create the WJb database schema (one-time):

   await WJbSqlServer.InitDbAsync(connectionString);

2. Register the store:

   builder.Services.AddSingleton<IStore>(_ => 
       new MsSqlStore(() => new SqlConnection(connectionString)));

3. Use the rest of the application exactly as usual.

The connection string is normally taken from appsettings.json:

{
  "ConnectionStrings": {
    "SqlServer": "Server=(localdb)\\MSSQLLocalDB;Initial Catalog=WJbDemo;Integrated Security=true;"
  }
}

Monitor Demo

This sample shows the complete WJb Monitor Demo running on SQL Server with almost zero changes compared to other providers.

You get the same:

  • Background jobs & workflows
  • Live monitoring dashboard
  • Execution history
  • Retry handling
  • Action & service discovery
Only the storage backend is different.

Resources

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.