| 2012-05-30 02:25:20 utc | wtian | Hi |
| 2012-05-30 02:26:21 utc | jmettraux | wtian: hello |
| 2012-05-30 02:26:41 utc | wtian | I am using ruote-kit with a Rails 3.0 project. I would like to call some method upon workflow process completion. What's the best way to do it? |
| 2012-05-30 02:27:17 utc | jmettraux | there are a few ways to do that |
| 2012-05-30 02:27:34 utc | jmettraux | first would be to add a participant as the last "step" of your process |
| 2012-05-30 02:27:41 utc | wtian | Hi John, good morning! |
| 2012-05-30 02:27:55 utc | jmettraux | good morning ! :-) |
| 2012-05-30 02:28:36 utc | jmettraux | second would be to add a service that observes the worker and upon it handling a "terminate" msg, do something |
| 2012-05-30 02:30:55 utc | wtian | With the first approach, that last participant should handle the :on_completion automatically. Is there any ready-made participant that does that? |
| 2012-05-30 02:32:20 utc | jmettraux | no, there is no need for ready-made participants that do that |
| 2012-05-30 02:33:02 utc | wtian | On second thought, I think a simple BlockParticipant should do the work. I can just put all the logic in the Ruby block, right? |
| 2012-05-30 02:33:09 utc | jmettraux | (here is an example of the second approach: https://gist.github.com/2833014 ) |
| 2012-05-30 02:33:26 utc | jmettraux | yes, you can put all the logic in a Ruby block thanks to a BlockParticipant |
| 2012-05-30 02:33:36 utc | jmettraux | you can also develop your own participant, like in: |
| 2012-05-30 02:34:13 utc | jmettraux | https://gist.github.com/2833034 |
| 2012-05-30 02:35:35 utc | jmettraux | wtian: I'm sorry, I have to move away from the computer for a while (I'll be back after lunch) |
| 2012-05-30 02:36:42 utc | wtian | Thanks a lot. You've been very helpful :-) |
| 2012-05-30 02:37:02 utc | jmettraux | you're welcome :-) |
| 2012-05-30 04:17:11 utc | jmettraux | back |
| 2012-05-30 15:49:03 utc | jadams | hey all |
| 2012-05-30 19:42:40 utc | jmettraux | jadams: hello |
| 2012-05-30 19:45:50 utc | jadams | jmettraux: heya. I'm running to a call right now, bbiab |