Overview
The user signup workflow coordinates multiple activities:- Creating the user account
- Sending verification email
- Waiting for email verification (with timeout)
- Setting up user profile
- Sending welcome notification
Workflow Implementation
Activity Implementations
Create User Activity
Send Verification Email Activity
Activate User Account Activity
Create User Profile Activity
Send Welcome Email Activity
Starting the Workflow
Handling Email Verification
When the user clicks the verification link in their email:Monitoring Progress
Error Handling
The workflow handles various error scenarios:- Verification Timeout: If the user doesn’t verify within 24 hours, a reminder is sent
- User Cancellation: Users can cancel signup via the
cancelSignupsignal - Activity Failures: Activities automatically retry with exponential backoff
- Duplicate Emails: The
CreateUserActivityshould handle unique constraint violations
Key Features
- Durable State: Workflow state persists across process restarts
- Signal Methods: Handle external events like email verification
- Timeouts: Automatic timeout handling for time-sensitive operations
- Retry Logic: Built-in retry mechanism for transient failures
- Event Tracking: All steps are logged for audit and debugging