Skip to main content

Reminders

Send periodic reminders until opt-out or timeout.

Problem and approach

This document describes the Reminder Flow Pattern implemented using Dex. The Reminder Flow Pattern allows a Flow to send periodic reminders to users, handle user opt-out requests, and manage timeouts. This is particularly useful in scenarios where user engagement is critical, and automated follow-ups are needed to ensure tasks are completed.

Key Components

  1. ReminderFlow: The main Flow class that defines the Steps and handles reminders and timeouts.
  2. InitStep: The initial Step that sets up the Flow and transitions to the process timeout and reminder Steps.
  3. ProcessTimeoutStep: Handles the timeout process and updates an external system.
  4. ReminderStep: Handles processing user opt-out signals, sending reminders, and looping back to wait for the next reminder or opt-out.

Code examples

Full runnable samples live under examples/{go,java,python,typescript} (HTTP prefix /design-pattern/... where applicable).

# See examples/python/dex_examples/patterns/workflow/reminders/