WJb Docs - Reference
Browse APIs, configuration options, interfaces, and implementation details.
⚡ Actions
🔀 Workflow
📦 Jobs
⚙️ Runtime
💾 Persistence
🗄 Storage
🧩 Workflow Metadata
🛠 Extensions & Helpers
JobOptions
Represents execution options associated with a job.
JobOptions allows job behavior to be configured independently of the action implementation.
Purpose
Use JobOptions to control how a job is executed by the WJb runtime.
Job
↓
JobOptions
↓
Runtime Behavior
Options travel with the job and are evaluated by the runtime during execution.
Responsibilities
Job options typically define execution-related behavior such as:
- Scheduling
- Retry behavior
- Queue selection
- Execution constraints
- Runtime settings
Execution Flow
Enqueue
↓
JobOptions
↓
Store
↓
Worker
↓
Execution
The configured options remain associated with the job throughout its lifecycle.
Why JobOptions Exists
Keeping execution configuration separate from business logic improves maintainability.
Action
↓
Business Logic
JobOptions
↓
Execution Behavior
This allows workflow behavior to evolve without modifying action code.
Runtime Usage
The runtime may inspect job options when determining:
- When a job should run
- How a job should run
- What should happen after failures
- Which worker can process the job
Best Practices
Keep Business Logic Separate
Use actions for business rules.
Use job options for execution configuration.
Prefer Explicit Configuration
Configure behavior intentionally instead of relying on implicit defaults when workflow requirements are important.
Reuse Known Patterns
Apply the same option conventions across similar jobs to improve consistency.
Relationship to JobInfo
JobInfo represents a job.
JobOptions represents how that job should be executed.
JobInfo
↓
JobOptions
Relationship to EnqueueInfo
Job options are commonly associated with job creation and enqueue operations.
EnqueueInfo
↓
JobOptions
Related Types
- JobInfo
- EnqueueInfo
- JobStatus
- JobQuery
- JobEnvelope
See Also
- JobInfo
- EnqueueInfo
- JobStatus
- JobQuery