Overview:
We’re requesting the introduction of a central event/message bus within the Rewst platform to enable loosely coupled, event-driven automation. This feature would allow workflows to publish events and other workflows to subscribe to those events with flexible filtering.
----
Current Limitations:
Rewst currently provides:
Completion Handlers: Workflows can trigger other workflows on success/failure, but this creates a tight coupling between workflows and doesn’t allow filtering or conditional logic based on event content.
Webhook Triggers: While useful, these require explicitly targeting a workflow and do not support decoupled broadcasting or internal event reuse.
These approaches require hardcoding relationships between workflows, which limits scalability, reusability, and maintainability.
----
Proposed Enhancement:
Introduce a central internal event bus, where:
Any workflow can publish an event to the bus (e.g., user.onboarded, ticket.closed, backup.failed), optionally including a payload (e.g., JSON with metadata).
Other workflows can subscribe to events via a trigger that filters by:
Event name/topic (e.g., wildcard or prefix support)
Attributes in the event payload (e.g., event.customer == "Acme")
----
Example Use Cases:
A provisioning workflow publishes user.provisioned. Several other workflows listen for this:
One sends a welcome email.
One provisions access to a specific app only if department == "Finance".
A monitoring process emits job.failed. A responder workflow only triggers if severity == "critical".
---
Benefits:
Enables loosely coupled, reactive automation.
Reduces rigid workflow chaining and hardcoded logic.
Improves reusability by decoupling logic across domains.
Supports scalable, modular architecture aligned with modern event-driven design.
---
Optional Future Enhancements:
Add event history/replay for observability and debugging.
Support external systems publishing to the internal bus or consuming from it.
UI for exploring active events and their consumers.