Closed riverock closed 11 years ago
Hello,
@coffeeaddict, what do you think? ProcessObserver is your convenience.
For me it's OK. It makes sense. One could even go a step further and eliminate #on_msg and #on_pre_msg by making ProcessObserver inherit from Observer.
Waiting for Hartog's feedback. Thanks for the nice pull request.
John
:+1:
Many thanks!
Hello,
I enhanced Ruote::ProcessObserver to support the ability for a subclass to define onpre[action] methods. My application has the need to do something just prior to a specific message being processed. I originally implemented an on_pre_msg method in my application's Ruote::ProcessObserver subclass, however I found that I had to duplicate all the code from Ruote::ProcessObserver#on_msg that sets up the wfid and info parameters. I felt that a better solution was for Ruote::ProcessObserver to implement an on_pre_msg, by having it share code with the existing on_msg method.
I also added a couple of tests for my changes to test/functional/ft_77_process_observer.rb, and then ran the full suite of tests to make sure they still pass (which they did).
Please consider accepting my pull request.
Thanks, Denis Ahearn