Skip to content

Conversation

ianmacartney
Copy link
Contributor

Instead of modeling it as pause/resume, events are a good model here after all.

  • You can await an event by name and send an event by name, in the simplest case
  • You can also create an event ahead of time and pass around the ID.
  • An event is only ever consumed by one step.
  • It can be sent first or awaited first, and it'll have timestamps to know how long things took.
  • You can send a full "result" payload - which will become the step's result - allowing erroring / canceling

Closes #122
Fixes #19
Fixes #25


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

pkg-pr-new bot commented Oct 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/workflow/@convex-dev/workflow@135

commit: ec6a2b5

@ianmacartney
Copy link
Contributor Author

out in the latest alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add APIs for waiting on events and sending events Add support for pausing/resume workflows
1 participant