-
We're currently evaluating if riverqueue pro's workflow supports pause and resume. Real world use case:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@cayter hey there, thanks for the question. The current workflow engine can mostly do what you're asking. As of now, any task in the workflow automatically gets moved from There's no way to explicitly "pause" a workflow as in step 4, or to "resume" one in response to external events. I think you could probably achieve what you need even without that, though. Essentially you'd have an "await approval" task in the workflow which would get run like any other workflow step when all of its dependencies were unblocked. Each time it runs, it would check if all of its conditions (external approvals, no discrepancies, etc) had been met; if not you'd have the task snooze itself, either for a short while or until some distant future time. The missing piece is that there's no mechanism in River Pro today to "signal" this task to wake up and try again after some external event happens, so you'd have to find a way to implement that yourself for your app—essentially having a query to find the blocked job, and updating it from I think this would be a useful addition to the workflow engine, for example Temporal has these concepts for sending messages to workflows and workflow steps. I'll chat it through with @brandur and see if it's something we can put on our internal roadmap. |
Beta Was this translation helpful? Give feedback.
@cayter hey there, thanks for the question. The current workflow engine can mostly do what you're asking. As of now, any task in the workflow automatically gets moved from
pending
to eitheravailable
orscheduled
(depending on if it was originally scheduled at a later date) whenever all of its dependencies are completed and no longer blocking it.There's no way to explicitly "pause" a workflow as in step 4, or to "resume" one in response to external events. I think you could probably achieve what you need even without that, though. Essentially you'd have an "await approval" task in the workflow which would get run like any other workflow step when all of its dependencies were unblocked. E…