WJb Docs - Reference

Browse APIs, configuration options, interfaces, and implementation details.

⚡ Actions
🔀 Workflow
📦 Jobs
⚙️ Runtime
💾 Persistence
🗄 Storage
🧩 Workflow Metadata
🛠 Extensions & Helpers

IAction.NextAsync

Queues additional work from within an action.

IAction.NextAsync provides a convenient way to create the next step of a workflow during action execution.

Purpose

Use NextAsync when an action needs to continue a workflow by scheduling additional jobs.

Action A
    ↓
NextAsync
    ↓
Action B

This keeps workflow routing explicit and easy to follow.

Execution Flow

Job
 ↓
Action
 ↓
NextAsync
 ↓
Enqueue
 ↓
Next Job

Typical Usage

A workflow often consists of multiple actions.

Validate
   ↓
Import
   ↓
Notify

Each step can enqueue the next step when its work is complete.

Benefits

  • Explicit workflow routing
  • Simple workflow composition
  • Readable business processes
  • Easy testing and debugging

Workflow Chaining

NextAsync allows actions to build workflows from small, focused steps.

Step A
   ↓
Step B
   ↓
Step C

Each action remains responsible only for its own business logic.

Best Practices

Keep Actions Small

Prefer:

ValidateOrder
GenerateInvoice
SendEmail

Over:

ProcessEntireWorkflow

Keep Routing Explicit

A developer should be able to understand workflow progression by reading the action code.

Use Meaningful Workflow Steps

Each queued job should represent a clear business operation.

Relationship to JobCommand

Workflow routing eventually produces commands that are executed by the runtime.

NextAsync
      ↓
JobCommand
      ↓
Next Job

Related Types

  • IAction
  • IActionResult
  • NextResult
  • JobCommand
  • JobCommands

See Also

  • NextResult
  • JobCommand
  • JobCommands
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.