Menu

Your Workflow Asked Too Early (How to Add a Wait Step)
📰

Your Workflow Asked Too Early (How to Add a Wait Step)

DEV Community: backend·The Unmeshed Team·1 day ago
#by55M91F
#devtobackend#devto#dev#wait#workflow
Reading 0:00
15s threshold

Someone signs up for your app. One second later, the workflow asks for their promotions and gets nothing back.

Nothing is broken. The workflow just asked too early. The new account was still being set up behind the scenes, so the promotions couldn't find it yet. Ask again three seconds later and they show up.

A wait step is how you fix that. It tells the workflow to pause for a moment, then carry on.

Why not just sleep?

A three-second pause is easy anywhere. The harder cases are the long ones. A review period that lasts two days. A report that can only run after the quarter closes. A trading window that opens next Monday.

You don't want a process sitting in memory for two days, or an engineer setting a reminder to trigger the next step. You want the workflow to pause, keep its place, and pick up on its own when the time comes.

Three reasons to wait

Let a system catch up. Indexing, replication, a downstream job that needs a moment.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.