What are Workflows?
Workflows in Infinitic are classes that:- Extend the
Workflowbase class - Define business logic that orchestrates services and other workflows
- Execute deterministically to ensure reliability
- Maintain state across distributed executions
- Handle failures and retries automatically
Key Features
Service Orchestration
Call and coordinate multiple services with automatic retry and error handling
Asynchronous Execution
Dispatch tasks asynchronously and wait for results when needed using Deferred objects
Sub-workflows
Compose complex workflows from simpler workflow components
Channels
Receive external signals and events during workflow execution
Timers
Wait for specific durations or until specific times
Versioning
Update workflow logic while maintaining compatibility with running instances
Basic Workflow Structure
Workflow Context
Every workflow has access to contextual information during execution:Determinism
Workflows must be deterministic to ensure reliability. This means: Instead:- Use
timer()for time-based operations - Use
inline()for operations that need to run synchronously - Use service stubs for all external interactions
Inline Tasks
For simple computations that don’t require services, use inline tasks:Next Steps
Defining Workflows
Learn how to create and structure workflows
Calling Services
Understand how to call services from workflows
Workflow Methods
Explore available workflow methods and operations
Channels
Receive external signals during execution