serverlessworkflow / specification

Contains the official specification for the Serverless Workflow Domain Specific Language. It provides detailed guidelines and standards for defining, executing, and managing workflows in serverless environments, ensuring consistency and interoperability across implementations.
http://serverlessworkflow.io
Apache License 2.0
747 stars 147 forks source link

Add a new `until` (optional) property to Event Consumption Strategies of type `any` #992

Open cdavernas opened 3 months ago

cdavernas commented 3 months ago

What would you like to be added:

Add a new until (optional) property to Event Consumption Strategies of type any

Why is this needed:

Allows authors to define streaming-like event listeners, that would listen to events until a specific condition is met or until specific events are consumed.

My proposal would allow doing the following:

Listen to specific events until a runtime expression condition is met:

listen:
  to:
    any: #if no event is defined, all incoming events are matched
      - type: event1
      - type: event2
    until: $context.finishedConsumingEvents

Listen to specific events until the defined event(s) are consumed:

listen:
  to:
    any: {}
  until:
    one:
      with:
        type: io.serverlessworkflow.examples.events.end-listening.v2
github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.