Open sfmskywalker opened 5 days ago
To implement the proposed enhancements for the PublishEvent and Event activities to allow for external application integration, you would need to extend the current functionality of Elsa Workflows. Here's how you could approach this based on the existing documentation and features:
PublishEvent Activity Enhancement:
PublishEvent
activity to publish events to external systems by integrating with the Elsa.Webhooks
package. This package can listen for domain events and fire HTTP requests to registered webhooks. By publishing an event that the Elsa.Webhooks
package can recognize, you can notify external applications of internal workflow events.Event Activity Enhancement:
Event
activities, you could expose an HTTP or AMQP API endpoint that external systems can call. When the endpoint receives a request, it would publish an internal event that the Event
activity subscribes to, thus triggering the workflow.Reference RunTask Activity:
RunTask
activity can serve as a model for this integration. It publishes a RunTaskRequest
domain event and waits for a response. Similarly, the PublishEvent
activity could publish an event that external systems can subscribe to, and the Event
activity could be triggered by external requests.Implementation Guidance:
RunTask
activity integrates with external applications using webhooks.PublishEvent
activity to publish events to the Elsa.Webhooks
module.Event
activity.Benefits:
Documentation and Resources:
RunTask
activity: https://v3.elsaworkflows.io/docs/activity-library/primitivesPlease note that these enhancements would require changes to the Elsa Workflows codebase and might involve creating custom activities or extending existing ones. If you are not familiar with the internal workings of Elsa Workflows, you may need to consult with the Elsa community or contributors for assistance.
This comment was generated by Glime.
Currently, the PublishEvent and Event activities only operate internally within the workflow engine. Enabling external applications to leverage these primitives would significantly enhance the system's flexibility and integration capabilities.
Proposed Enhancements
PublishEvent Activity Enhancement
EventPublished
event can be picked up by the Webhooks module, enabling external applications to handle these events and perform corresponding actions.Event Activity Enhancement
Implementation Guidance
Benefits
Implementing these enhancements will significantly improve the capabilities of the workflow engine, making it more robust and versatile in handling complex integrations with external systems.