Skip to main content

Polling

Wait on external readiness with simple timers or backoff Step retries.

Problem and approach

Here we demonstrate two basic and common design patterns for building Flows with Dex:

  1. Simple Polling Flow: This Flow periodically checks if a system is ready using a Timer condition, and proceeds to the next Step once the system is ready.

  2. Backoff Polling Flow: This Flow is an alternative approach to the Simple Polling Flow; it is using a retry mechanism (with exponential backoff) that proceeds to the next Step once a successful response is received from the (external) system/API.

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/polling/