Dear Activiti community,
I'd like to get your feedback on the idea of having a process event bus component as part of the Activiti engine.
The process event bus is a lightweight and extensible "message bus" that allows for registering to and receiving events with rich context information from the Activiti engine and other Activiti components such as the deployment mechanism, the repository or the identity management (so not only events directly resulting from the pvm / while executing a process instance would be fired, but also events from other components).
Possible events that could/should be fired:
- starting and ending a process instance / activity instance
- receiving events/signals from external systems
- creating, assigning, delegating, completing a (user) task
- deploying a new process definition (version)
- creating / manipulating users
- starting / stopping the engine
Based on such events, the following use cases could be supported:
- process history / process execution statistics
- audit log
- external task management
- process inspection / diagnosis / debugging
- process simulation
In short, the process event bus should support the following mechanisms:
- register/unregister event listeners for specific event types
- possibility to fire events from specific activities and service components
- possibility to trigger custom events out of the process itself
- extensible event type hierarchy
- support for enabling/disabling specific types of events
We see that concept as an integral part of the Activit engine and a crucial and powerful option to integrate Activit into various environments and to extend the engine with higher-level, value-added components. While developing edoras workflow for customer projects in the past, we heavily relied on the concept of the process event bus (even for core technical aspects like persistence or security), and we learned this to be a powerful concept for implementing specific customer requirements such as connecting to an existing auditing system or feeding a management cockpit application in a "clean" way based on a well-designed, generic extension point.
The branch "chst-history" contains both a process event bus spike and an simple implementation of a process history based on events received from the process event bus. Please note that this branch does not include the major refactorings that have been made on the trunk during the last few days, but the concepts are still valid. Essential classes can be found in modules/activiti-engine/src/main/java/org/activiti/pvm/event. Regarding the new pvm approach developed on the trunk, the process event bus could register itself with the low-level event mechanism provided by the pvm, enrich these low-level events with the required semantics and propagate them to the registered process event bus listeners.
My questions for you:
- what is your opinion regarding such a process event bus component as part of the Activiti engine?
- do you see any specific pros and cons for having a process event bus in Activiti?
- do you see additional use cases based on your experiences and plans?
- what other event types would you expect to see?
Your valuable feedback is highly appreciated!
Regards,
Christian