WJb Docs - Reference
Browse APIs, configuration options, interfaces, and implementation details.
⚡ Actions
🔀 Workflow
📦 Jobs
⚙️ Runtime
💾 Persistence
🗄 Storage
🧩 Workflow Metadata
🛠 Extensions & Helpers
IActionResult
Represents the outcome of an action execution.
Every action returns an IActionResult to describe what should happen after execution completes.
IActionResult does not perform work directly. Instead, it describes workflow intent that is later translated into one or more JobCommand instances.
Purpose
Use IActionResult to control workflow progression.
Typical outcomes include:
- Complete the current workflow
- Schedule additional work
- Continue with another action
- Produce multiple follow-up jobs
Execution Flow
Job
↓
Action
↓
IActionResult
↓
JobCommand
↓
Workflow Continues
Why Results Exist
Actions contain business logic.
Workflow decisions are represented by results.
This separation keeps execution predictable and makes workflow transitions explicit.
Action
handles business logic
IActionResult
describes workflow behavior
Common Implementations
Common result types include:
- CompleteResult
- NextResult
Results helper.
Returning a Result
A successful action typically returns a result.
return Results.Complete();
or
return Results.Next(...);
Translation to Commands
The runtime converts results into executable commands.
IActionResult
↓
JobCommand
↓
Store
↓
Worker
This allows workflow decisions to be persisted and executed consistently.
Best Practices
Return Explicit Results
Choose a result that clearly represents the desired workflow behavior.
Avoid hiding workflow transitions inside unrelated services or infrastructure.
Keep Business Logic in Actions
Actions determine what happened.
Results determine what happens next.
Prefer Results Helper Methods
Use the Results helper when creating result instances.
This keeps code concise and improves readability.
Relationship to Results
Results provides convenient factory methods for creating result instances.
Results
↓
IActionResult
Relationship to JobCommand
IActionResult describes intent.
JobCommand represents executable workflow instructions derived from that intent.
IActionResult
↓
JobCommand
Related Types
- Results
- CompleteResult
- NextResult
- JobCommand
- JobCommands
- IAction
See Also
- Results
- CompleteResult
- NextResult
- JobCommand