WJb Docs - Reference

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

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

JobCommandCondition

Represents a condition associated with a workflow command.

JobCommandCondition is used to determine whether a command should be applied when workflow commands are evaluated.

Purpose

A condition allows workflow behavior to be controlled without changing the action that produced the command.

Command
    ↓
Condition Evaluated
    ↓
Execute or Skip

Execution Flow

Action
 ↓
IActionResult
 ↓
JobCommand
 ↓
JobCommandCondition
 ↓
Runtime Decision

The runtime evaluates the condition before applying the command.

Typical Usage

Conditions are commonly used when workflow transitions depend on runtime state or execution context.

Examples include:

  • Optional workflow steps
  • Environment-specific execution
  • Feature-controlled behavior
  • Conditional routing

Benefits

  • Explicit workflow rules
  • Reusable command definitions
  • Predictable workflow behavior
  • Clear separation between workflow generation and workflow evaluation

Best Practices

Keep Conditions Simple

Conditions should be easy to understand and verify.

Keep Conditions Deterministic

A condition should produce predictable results for the same inputs.

Prefer Explicit Workflow Rules

Workflow behavior should remain visible and understandable by reading the definition.

Relationship to JobCommand

JobCommand describes the operation.

JobCommandCondition determines whether the operation should be applied.

JobCommand
      ↓
JobCommandCondition
      ↓
Apply Command

Relationship to JobCommands

A collection of commands may contain commands with different conditions.

Each command is evaluated independently.

Related Types

  • JobCommand
  • JobCommands
  • IActionResult
  • NextResult
  • Results

See Also

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