WJb Docs - Reference

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

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

JobCommand / JobCommand<T>

Represents a workflow instruction generated from an action result.

JobCommand is the bridge between workflow intent and workflow execution.

Actions return an IActionResult. The runtime converts that result into one or more JobCommand instances that describe the work that should be performed next.

Purpose

Use JobCommand to represent executable workflow transitions.

IActionResult
       ↓
  JobCommand
       ↓
 Runtime

Execution Flow

Job
 ↓
Action
 ↓
IActionResult
 ↓
JobCommand
 ↓
Next Job

The command represents what the runtime should do after the current action completes.

JobCommand

Represents a workflow instruction.

Common uses include:

  • Completing a workflow
  • Scheduling work
  • Creating follow-up jobs
  • Continuing execution

JobCommand

Provides a strongly typed command model.

The generic parameter represents the payload associated with the next job.

JobCommand<EmailRequest>
JobCommand<ImportRequest>
JobCommand<InvoiceRequest>

Strong typing improves readability and reduces runtime errors.

Workflow Routing

Commands enable explicit workflow progression.

Validate
   ↓
JobCommand
   ↓
Import
Import
   ↓
JobCommand
   ↓
Notify

Command Generation

Commands are typically produced indirectly.

Action
 ↓
Results
 ↓
IActionResult
 ↓
JobCommand

Application code usually works with results rather than constructing commands directly.

Multiple Commands

A workflow may generate more than one command.

Import File
      ↓
 ┌────┼────┐
 ↓    ↓    ↓
 A    B    C

This allows fan-out workflows and parallel processing scenarios.

Best Practices

Keep Commands Focused

A command should represent a single workflow decision.

Prefer Strongly Typed Payloads

Use JobCommand when a payload model exists.

Keep Workflow Intent Explicit

Commands should clearly communicate what work is expected to occur next.

Relationship to IActionResult

IActionResult describes workflow intent.

JobCommand represents the executable instruction derived from that intent.

IActionResult
       ↓
  JobCommand

Relationship to JobCommands

JobCommands represents a collection or grouping of commands.

JobCommand
      ↓
JobCommands

Related Types

  • IActionResult
  • Results
  • CompleteResult
  • NextResult
  • JobCommands
  • JobCommandCondition

See Also

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