Workflows

This guide covers techniques for coordinating and managing complex task execution workflows. Learn how to chain tasks, build multi-step processes, and orchestrate sophisticated business workflows.

Overview

EverTask provides powerful capabilities for building complex, multi-step workflows:

When to Use Task Orchestration

Most applications start with simple, independent tasks. Consider orchestration when you need to:

Task Chaining

  • Execute multiple tasks in sequence
  • Pass data between related tasks
  • Branch workflows based on task results
  • Implement conditional task execution

Complex Workflows

  • Multi-stage business processes (order processing, payment flows)
  • Saga patterns with compensation and rollback
  • State machine-based workflows
  • Parallel task execution with coordination

Best Practices

Continuations

  1. Keep Chains Short: Long chains are debugging nightmares
  2. Store Correlation IDs: Use GUIDs to trace through multiple tasks
  3. Handle Failures Gracefully: Always implement OnError to clean up after failures
  4. Consider Idempotency: Tasks might get retried or run multiple times

Cancellation

  1. Check CancellationToken: Respect the cancellation token in your handlers
  2. Clean Up Resources: Dispose resources properly when cancelled
  3. Log Cancellations: Track when and why tasks get cancelled
  4. Test Cancellation: Make sure your handlers actually handle cancellation correctly

Next Steps


Table of contents


Copyright © 2025 Giampaolo Gabba. Distributed under the APACHE 2.0 License.