Skip to main content

Entity & Lifecycle Patterns

View Markdown

These patterns model long-lived business entities as Workflows and keep those Workflows healthy as they run for days, months, or indefinitely. They cover how an entity holds and mutates state, how you bound Workflow history growth, and how you manage timers that change over time.

Patterns in this section

Choosing a pattern

You are modeling something with an ongoing lifecycle — an account, a device, a subscription: use an Entity Workflow as the single source of truth for that entity.

Your Workflow runs long enough to grow a large history: apply Continue-As-New to reset history while preserving state.

You need a wait that responds to new information: use an Updatable Timer instead of a fixed sleep.