Why choose Sailhouse for workflows?
Most workflow engines require you to define your entire workflow upfront in a rigid structure. With Sailhouse, workflows emerge naturally from your event-driven architecture using primitives you already understand: topics, subscriptions, wait groups, and cron jobs. This means:- Incredible flexibility - workflows adapt automatically based on your logic. Send 1 event or 4 depending on conditions like user preferences or feature flags
- Natural debugging - each step is a separate event you can inspect and replay
- Built-in observability - every event is tracked and can be monitored
- It’s just events - it’s no different to the rest of your application
Getting started with workflows
The simplest workflows on Sailhouse are just a chain of events, but sometimes, you need a little more control and parallelism - so let’s dive into how you can achieve that.Building your first workflow
Let’s walk through a real-world example: processing a new user signup. This workflow needs to:- Validate the user’s email
- Create their account in the database
- Send a welcome email
- Set up their default preferences
- Trigger a follow-up email sequence
user-onboarding-complete
event fires, which can trigger the follow-up sequence.
Handling complex branching logic
Real workflows aren’t linear. Sometimes you need different paths based on conditions, error handling, or user actions. Sailhouse handles this naturally through conditional event publishing. Let’s extend our signup example to handle different user types:Error handling and retries
One of the biggest advantages of Sailhouse workflows is built-in error handling. Since each step is an event, you get automatic retries, dead letter queues, and graceful failure handling without any extra configuration.Advanced workflow patterns
Long-running workflows with scheduling
Some workflows span days, weeks, or even months. Think about a user onboarding sequence, subscription renewals, or compliance workflows. Sailhouse handles this brilliantly with scheduled events and cron jobs.Building approval workflows
Many business processes require human approval. Traditional workflow engines make this cumbersome, but Sailhouse’s event-driven approach makes it natural.Coordinating microservices
If you’re running a microservices architecture, Sailhouse workflows excel at coordinating cross-service operations while maintaining service boundaries.Next steps
Get started with Sailhouse
New to Sailhouse? Start here to get set up and send your first event.
Learn about wait groups
Master the coordination primitive that powers parallel workflow execution.
Schedule events
Build time-based workflows with delays, timeouts, and scheduling.
Set up cron jobs
Trigger workflows on a regular schedule with cron jobs.