Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the difference between an event-driven schedule and a startup listen task #987

Merged

Conversation

cdavernas
Copy link
Member

@cdavernas cdavernas commented Aug 21, 2024

Please specify parts of this PR update:

  • Specification
  • Schema
  • Examples
  • Extensions
  • Use Cases
  • Community
  • CTK
  • Other

Discussion or Issue link:

Fixes #972
Fixes #977

What this PR does:

  • Documents the difference between an event-driven schedule and a startup listen task
  • Documents the input of a workflow that has been started by an event-driven schedule
  • Adds examples to document event-driven and cron schedules

…artup listen task

- Added examples to document event-driven and cron schedules

Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
@cdavernas cdavernas added change: fix Something isn't working. Impacts in a minor version change. change: documentation Improvements or additions to documentation. It won't impact a version change. labels Aug 21, 2024
@cdavernas cdavernas added this to the v1.0.0 milestone Aug 21, 2024
dsl.md Outdated Show resolved Hide resolved
dsl.md Outdated Show resolved Hide resolved
dsl.md Outdated Show resolved Hide resolved
dsl.md Outdated Show resolved Hide resolved
dsl.md Outdated Show resolved Hide resolved
one:
with:
type: com.example.hospital.events.patients.heartbeat.low
do:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have to use a listener task instead in this example?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on what you want to achieve.

The objective here is to trigger a new workflow when and only when the event is received.

Using a listen task would mean you'd have started a workflow out of the blue, then wait potentially forever for an event to be consumed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our private conversation, we agreed to follow up with an issue to review the schedule.on naming since it may confuse users. Some may expect that schedule enforces a timestamp definition.

cdavernas and others added 5 commits August 21, 2024 17:51
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
one:
with:
type: com.example.hospital.events.patients.heartbeat.low
do:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our private conversation, we agreed to follow up with an issue to review the schedule.on naming since it may confuse users. Some may expect that schedule enforces a timestamp definition.

@ricardozanini ricardozanini merged commit eb050fd into serverlessworkflow:main Aug 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change: documentation Improvements or additions to documentation. It won't impact a version change. change: fix Something isn't working. Impacts in a minor version change.
Projects
Status: Done
2 participants