| 2010-10-14 07:34:27 utc | tosch_le__ | hi all! |
| 2010-10-14 07:34:43 utc | tosch_le__ | just contemplating about http://github.com/kennethkalmer/ruote-kit/issues/#issue/5 |
| 2010-10-14 07:35:04 utc | tosch_le__ | i'm unsure if it should be addressed in ruote-kit directly |
| 2010-10-14 07:35:31 utc | jmettraux | tosch_le__: hello |
| 2010-10-14 07:36:02 utc | tosch_le__ | there are too many ways to run rk; changing the exception handling in one way or another is bound to be a problem for someoone. |
| 2010-10-14 07:36:29 utc | jmettraux | ok |
| 2010-10-14 07:37:16 utc | jmettraux | I have something I have to do with rk, it seems related |
| 2010-10-14 07:37:46 utc | tosch_le__ | tell me about it :-) |
| 2010-10-14 07:38:00 utc | jmettraux | /_ruote is vanilla, but I have a customer who wants to deploy to something like /xyz/_ruote |
| 2010-10-14 07:38:13 utc | jmettraux | argh, it's not related |
| 2010-10-14 07:38:19 utc | tosch_le__ | rails 3 is great for that case |
| 2010-10-14 07:39:01 utc | tosch_le__ | the hardcoded routes to /_ruote in rk are some kind of problem, though |
| 2010-10-14 07:39:21 utc | jmettraux | indeed |
| 2010-10-14 07:39:21 utc | jmettraux | (mea culpa) |
| 2010-10-14 07:39:51 utc | jmettraux | back to the original topic, is it possible to shrink that to one match call ? |
| 2010-10-14 07:40:33 utc | tosch_le__ | no, i tried |
| 2010-10-14 07:41:22 utc | jmettraux | ok |
| 2010-10-14 07:42:29 utc | jmettraux | I'd put a link to the issue in your solution's comment |
| 2010-10-14 07:42:48 utc | jmettraux | I like the fact you commented the issue in the code |
| 2010-10-14 07:43:00 utc | jmettraux | looks good |
| 2010-10-14 07:43:13 utc | tosch_le__ | oups. should have put the link in the commit message, of course. |
| 2010-10-14 07:43:56 utc | jmettraux | great |
| 2010-10-14 07:44:11 utc | jmettraux | would you also like to work on the /xyz/_ruote/ thing ? |
| 2010-10-14 07:44:55 utc | tosch_le__ | i tried that one some time ago, we discussed it, too. there's no possible solution within sinatra/rk. |
| 2010-10-14 07:45:11 utc | jmettraux | orly ? |
| 2010-10-14 07:45:37 utc | tosch_le__ | pardon? |
| 2010-10-14 07:45:41 utc | jmettraux | oh really ? |
| 2010-10-14 07:45:50 utc | tosch_le__ | yes, indeed ;-) |
| 2010-10-14 07:46:16 utc | tosch_le__ | i suppose there's some rack middleware in the stack needed which runs before rk and rewrites the path |
| 2010-10-14 07:46:26 utc | jmettraux | ok |
| 2010-10-14 07:46:41 utc | tosch_le__ | or a customized RuoteKit::Application which does that |
| 2010-10-14 07:47:02 utc | tosch_le__ | together with rails3's routing, that should be a powerful solution |
| 2010-10-14 07:47:06 utc | jmettraux | the problem seems localized to our link generation could |
| 2010-10-14 07:47:21 utc | jmettraux | s/could/code/g |
| 2010-10-14 07:47:25 utc | tosch_le__ | hello rebo! |
| 2010-10-14 07:47:32 utc | jmettraux | rebo: hello |
| 2010-10-14 07:47:35 utc | rebo | hi guys |
| 2010-10-14 07:47:43 utc | tosch_le__ | we're just discussing about the issue you submitted yesterday |
| 2010-10-14 07:48:03 utc | rebo | ah ok, do you think its more of a rails / sinatra issue? |
| 2010-10-14 07:48:07 utc | rebo | thank a ruotekit issue? |
| 2010-10-14 07:48:12 utc | rebo | than* |
| 2010-10-14 07:48:12 utc | tosch_le__ | i don't think that should be addressed within ruote-kit itself |
| 2010-10-14 07:48:26 utc | rebo | yeah i thought that might be the case |
| 2010-10-14 07:48:58 utc | tosch_le__ | the problem is that routing and exception handling are duplicated: both sinatra (used by rk) and rails provide that |
| 2010-10-14 07:49:19 utc | rebo | though from a useability point of view its a shame that it blocks the rails exception reporting page |
| 2010-10-14 07:49:26 utc | rebo | Yeah |
| 2010-10-14 07:49:37 utc | tosch_le__ | you used the wrong configuration option ;-) |
| 2010-10-14 07:49:51 utc | rebo | Ah, what should i be using? |
| 2010-10-14 07:50:02 utc | tosch_le__ | use :raise_errors instead of :show_exceptions |
| 2010-10-14 07:50:08 utc | rebo | ok |
| 2010-10-14 07:50:15 utc | tosch_le__ | are you using rails 3 or 2? |
| 2010-10-14 07:50:18 utc | rebo | 3 |
| 2010-10-14 07:50:34 utc | tosch_le__ | have a look at http://github.com/tosch/ruote-on-rails/commit/758144abcd3c6675e82a198f001e5105e0d7d5e3, then |
| 2010-10-14 07:50:41 utc | tosch_le__ | far better solution |
| 2010-10-14 07:51:09 utc | tosch_le__ | (sinatra's routing will only be called for rk's routes) |
| 2010-10-14 07:51:31 utc | rebo | ah interesting |
| 2010-10-14 07:51:32 utc | rebo | yes |
| 2010-10-14 07:51:45 utc | rebo | i was using the middleware option |
| 2010-10-14 07:52:02 utc | rebo | thanks that looks like it solves it |
| 2010-10-14 07:53:05 utc | tosch_le__ | it won't do anything for exeptions within the /_ruote namespace, if you like to have rails' exception pages there, you'll have to use RuoteKit::Application.set(:raise_errors, true) |
| 2010-10-14 07:53:32 utc | rebo | its ok |
| 2010-10-14 07:53:42 utc | tosch_le__ | but i'd recommend using rails' routing to call rk anyway, routing will be slightly faster |
| 2010-10-14 07:53:57 utc | rebo | the /_ruote stuff is fine. Just used to seeing the rails exceptions on my rails app code |
| 2010-10-14 07:57:59 utc | tosch_le_ | ACTION cries: the internet went away |
| 2010-10-14 07:58:11 utc | tosch_le_ | but happily, it returned. |
| 2010-10-14 07:58:17 utc | tosch_le_ | btw: in rails 2, rails' exception handling is used anyway |
| 2010-10-14 07:59:31 utc | rebo | must be due to the changes in rack |
| 2010-10-14 08:00:05 utc | tosch_le_ | i suppose so, yes. |
| 2010-10-14 08:01:17 utc | tosch_le_ | so that's the ticket closed :-) |
| 2010-10-14 08:01:28 utc | rebo | ok cool, thanks again |
| 2010-10-14 08:01:39 utc | jmettraux | yes, thanks |
| 2010-10-14 09:12:58 utc | rebo | in ruote participants can reply, but is there a way to rollback to a previous workitem if the reply was accidentally issued ? |
| 2010-10-14 09:22:52 utc | rebo | or is the standard way to build it into the process definition via a cursor jump / rewind? |
| 2010-10-14 09:23:34 utc | tosch_le_ | it depends. |
| 2010-10-14 09:23:38 utc | tosch_le_ | have a look at http://ruote.rubyforge.org/process_administration.html#re_applying |
| 2010-10-14 09:26:16 utc | rebo | ah looks like i can use something like workitem.command = 'back' ? |
| 2010-10-14 09:26:32 utc | rebo | within a cursor |
| 2010-10-14 09:27:47 utc | tosch_le_ | yes, you may do that |
| 2010-10-14 09:28:31 utc | tosch_le_ | http://ruote.rubyforge.org/exp/cursor.html |
| 2010-10-14 09:28:44 utc | rebo | yep reading it now |
| 2010-10-14 09:28:53 utc | rebo | its surprising how powerful ruote is actually |
| 2010-10-14 09:29:06 utc | rebo | can't believe i've not heard of it before |
| 2010-10-14 09:29:55 utc | tosch_le_ | this powerfulness comes at a certain price: it's sometimes hard to implement/understand |
| 2010-10-14 09:30:11 utc | rebo | well yes, thats what i found |
| 2010-10-14 09:30:28 utc | rebo | very hard to understand it at first |
| 2010-10-14 09:30:35 utc | rebo | you definitely need some more newbie guides |
| 2010-10-14 09:31:02 utc | tosch_le_ | they're not easy to write if you're no newbie anymore |
| 2010-10-14 09:31:13 utc | rebo | yeah haha |
| 2010-10-14 09:31:15 utc | tosch_le_ | some some help would definitely be very welcome |
| 2010-10-14 09:31:47 utc | rebo | when i've got this app up and running i can put something together |
| 2010-10-14 09:31:55 utc | rebo | from a new users point of view |
| 2010-10-14 09:32:26 utc | rebo | was gonna use a state_machine but it really isnt suited for this business logic |
| 2010-10-14 09:32:57 utc | tosch_le_ | looking forward to read your report! |
| 2010-10-14 09:34:10 utc | rebo | i think the main difficulty is that in of itself ruote isn't the whole solution |
| 2010-10-14 09:34:17 utc | rebo | not that it should be |
| 2010-10-14 09:34:40 utc | tosch_le_ | neither is aasm |
| 2010-10-14 09:34:58 utc | tosch_le_ | both are tools |
| 2010-10-14 09:35:08 utc | rebo | yeah, but for some reason a statemachine is conceptually easier for people to understand |
| 2010-10-14 09:35:33 utc | rebo | even though it is nothing like a business process in real life |
| 2010-10-14 09:36:10 utc | rebo | maybe because state machines can be tied to actual things and a workflow is more abstract |
| 2010-10-14 09:37:13 utc | rebo | a person is in state "X" as apposed to a person is referenced by a workflow process that is in stage "Y" |
| 2010-10-14 09:39:42 utc | tosch_le_ | jmettraux is better on those things than me: http://jmettraux.wordpress.com/2009/07/03/state-machine-workflow-engine/ |
| 2010-10-14 09:45:45 utc | tosch_le_ | also worth a read: http://www.opensourcery.co.za/2009/07/06/driving-business-processes-in-ruby/ |
| 2010-10-14 14:58:35 utc | jmettraux | codebeaker: welcome to #ruote |
| 2010-10-14 14:59:10 utc | codebeaker | hi all, I am a typical clueless state machine user… normally I would use a state machine for an appication - but I started reading about workflow engines Vs. state machines, and since the ruote example is about editing and moderation, I think I might be in the right place |
| 2010-10-14 15:00:10 utc | jmettraux | well, if you only have one resource that has 3 states, maybe a workflow is overkill |
| 2010-10-14 15:00:16 utc | codebeaker | I have an idea of `recommendations` to improve my site's data - a user can for credit submit a recommendation (think of it like `here's how the data should look`) - the submission then has to be reviewed with someone with moderator or admin privileges, at which point it can be either rejected, or accepted (… and the uses gets credit, etc) |
| 2010-10-14 15:00:40 utc | jmettraux | will those "workflows" change ? |
| 2010-10-14 15:01:02 utc | codebeaker | I don't know, and ruote doesn't look like a massive barrier |
| 2010-10-14 15:01:10 utc | jmettraux | ok |
| 2010-10-14 15:01:14 utc | codebeaker | there are multiple resources that will have similar behaviour |
| 2010-10-14 15:03:10 utc | codebeaker | what's not clear from the example is whether or not the workflow can diverge… it's [submitted]->{rejected, accepted}… simple enough workflow - but I would like to learn something about doing it right :) |
| 2010-10-14 15:03:37 utc | jmettraux | yes, the workflow can diverge |
| 2010-10-14 15:04:15 utc | jmettraux | which example ? |
| 2010-10-14 15:04:26 utc | codebeaker | ruote.rubyforge, the first one |
| 2010-10-14 15:04:33 utc | jmettraux | ok, looking |
| 2010-10-14 15:05:12 utc | codebeaker | it almost seems to my naieve understanding that the workflow is submission->review and in parallel there is a state to the object - of "awatiting review" then "rejected" or "accepted" |
| 2010-10-14 15:05:31 utc | jmettraux | it's not naive, it's what is happening |
| 2010-10-14 15:05:48 utc | jmettraux | a workflow can change the state of 1+ object |
| 2010-10-14 15:06:28 utc | codebeaker | ah… that's interesting |
| 2010-10-14 15:06:42 utc | codebeaker | so my workflow could encompass applying the recommendation to an object |
| 2010-10-14 15:06:57 utc | codebeaker | and notifying the user, and updating their reputation |
| 2010-10-14 15:07:03 utc | jmettraux | yes |
| 2010-10-14 15:07:05 utc | codebeaker | which is suddenly four systems involved |
| 2010-10-14 15:07:32 utc | jmettraux | you can (you already did) do it without a workflow engine |
| 2010-10-14 15:07:55 utc | jmettraux | but the workflow engine forces you to come up with a recipe on how to reach a result |
| 2010-10-14 15:08:07 utc | codebeaker | well, right now I have nothing - a bunch of activerecord objects, and what I fear will be a hell of complex interactions :-D |
| 2010-10-14 15:08:57 utc | tosch_le_ | you really should answer the question if your workflow(s) will change |
| 2010-10-14 15:08:59 utc | codebeaker | I didn't tackle how to implement "applying" a recommendation to an object, as I feel that "applying" or "rejecting" a recommendation should be transactional, and reliable |
| 2010-10-14 15:09:38 utc | codebeaker | tosch_le_: right now, I don't know - the paradigm of user submitted content, being reviewed and applied is unlikely to change, but the mechanics of who can submit what, or whether an object is open for recommendations might change |
| 2010-10-14 15:09:54 utc | codebeaker | but… that suggests that the things which could change aren't part of the workflow |
| 2010-10-14 15:09:54 utc | jmettraux | an applied recommendation is a record in your db ? |
| 2010-10-14 15:09:59 utc | codebeaker | yes |
| 2010-10-14 15:10:08 utc | codebeaker | well… no - sorry read that too quickly |
| 2010-10-14 15:10:28 utc | codebeaker | a "Recommendation" is– owned by a user, related to the object it suggests to improve |
| 2010-10-14 15:10:38 utc | codebeaker | right now there's no notion of acepted, rejected or applied |
| 2010-10-14 15:11:31 utc | codebeaker | but they exist in the database |
| 2010-10-14 15:12:44 utc | jmettraux | codebeaker: in the first page example, the state of the "document" is only touched at the "publish" stage |
| 2010-10-14 15:13:10 utc | jmettraux | the rest of the flow is a workitem passing among human participants |
| 2010-10-14 15:14:02 utc | codebeaker | I wonder if I'm having a bad day or something :-D that example is hurting my brain… |
| 2010-10-14 15:14:24 utc | tosch_le_ | nah, you have to get used to the terminology |
| 2010-10-14 15:14:31 utc | jmettraux | what is hard to get ? |
| 2010-10-14 15:14:56 utc | jmettraux | the second part reads like a bunch of callbacks |
| 2010-10-14 15:15:06 utc | jmettraux | a participants "reacts" on incoming workitems |
| 2010-10-14 15:15:44 utc | jmettraux | the name of the participants appear in the process definition and they are registered in the second part |
| 2010-10-14 15:16:07 utc | jmettraux | the first part (the process definition) orchestrates the work flow among participants |
| 2010-10-14 15:16:42 utc | codebeaker | ok lemme look again |
| 2010-10-14 15:18:44 utc | codebeaker | ah, ok - I see it now |
| 2010-10-14 15:19:40 utc | codebeaker | what's the significance of "process instances" - that doesn't appear to make sense in the context… where do those three args passed go ? |
| 2010-10-14 15:20:16 utc | jmettraux | you have a third part |
| 2010-10-14 15:20:23 utc | jmettraux | "launching some process instances" |
| 2010-10-14 15:20:31 utc | jmettraux | it means running the process |
| 2010-10-14 15:20:37 utc | jmettraux | 2 times in that example |
| 2010-10-14 15:20:44 utc | jmettraux | each time for a different document |
| 2010-10-14 15:20:53 utc | jmettraux | so the result is two process instances |
| 2010-10-14 15:21:15 utc | tosch_le_ | in your case you would launch a process instance each time a user submits a recommendation |
| 2010-10-14 15:21:19 utc | jmettraux | like in your operating system you can have two running instances of a program |
| 2010-10-14 15:21:29 utc | jmettraux | +1 for tosch_le |
| 2010-10-14 15:21:55 utc | codebeaker | ah, ok - all clear |
| 2010-10-14 15:22:07 utc | codebeaker | and that has to run in a separate process, along side the application ? |
| 2010-10-14 15:23:10 utc | jmettraux | not necessarily[ |
| 2010-10-14 15:23:36 utc | jmettraux | if you can spare a thread for it, it will happily live inside of your app |
| 2010-10-14 15:23:44 utc | codebeaker | ah, intersting |
| 2010-10-14 15:24:07 utc | codebeaker | jmettraux - as the author, what's the typical usecase for this? |
| 2010-10-14 15:24:12 utc | codebeaker | … am I overcooking this egg this way ? |
| 2010-10-14 15:24:26 utc | jmettraux | it's a workflow engine |
| 2010-10-14 15:24:53 utc | jmettraux | if the process never changes, a classical app is OK |
| 2010-10-14 15:25:18 utc | jmettraux | if you want the process [definition] to be first class and modifiable, a workflow engine might be valuable |
| 2010-10-14 15:25:56 utc | codebeaker | "never" can also mean "is well tested, and simple enoguh to change once a year if it needs it" - right ? |
| 2010-10-14 15:26:10 utc | jmettraux | yes |
| 2010-10-14 15:26:16 utc | codebeaker | ok… thanks jmettraux |
| 2010-10-14 15:26:19 utc | codebeaker | and tosch_le_ :) |
| 2010-10-14 15:26:25 utc | jmettraux | it also means |
| 2010-10-14 15:26:26 utc | tosch_le_ | it was a pleasure |
| 2010-10-14 15:26:32 utc | codebeaker | I wonder if it's too complex… but I sure would love to get some experience using it |
| 2010-10-14 15:26:39 utc | tosch_le_ | s/was/is ;-) |
| 2010-10-14 15:26:43 utc | jmettraux | that you can have lots of different process instances running together in your app |
| 2010-10-14 15:27:12 utc | jmettraux | take an afternoon to play with it |
| 2010-10-14 15:27:28 utc | tosch_le_ | pro state machine: probably less overhead |
| 2010-10-14 15:27:31 utc | jmettraux | or simply come back in a year |
| 2010-10-14 15:27:33 utc | codebeaker | sure, the process running on the side worries me a bit… it's another external reliability – |
| 2010-10-14 15:27:48 utc | tosch_le_ | pro workflow engine: process definition re-usable for different objects |
| 2010-10-14 15:27:53 utc | codebeaker | I have to monitor that thread, or make sure that process is always running… although if it dies, the states are on disk - right ? |
| 2010-10-14 15:28:09 utc | tosch_le_ | yes, there's persistence available |
| 2010-10-14 15:28:12 utc | codebeaker | tosch_le_: ok that might be a seller, because i have right now already 5 kinds of recommendations |
| 2010-10-14 15:28:25 utc | codebeaker | and the workflow is always the same |
| 2010-10-14 15:28:45 utc | tosch_le_ | and ruote itself is said to be reliable |
| 2010-10-14 15:28:50 utc | jmettraux | lol |
| 2010-10-14 15:28:54 utc | jmettraux | strives to |
| 2010-10-14 15:29:24 utc | codebeaker | ok, so after a dip i confidence there, multiple objects having the same workflow is a good feature… |
| 2010-10-14 15:29:38 utc | tosch_le_ | beware, ymmv |
| 2010-10-14 15:29:51 utc | codebeaker | sure – but now it's worth a coupe of hours |
| 2010-10-14 15:30:23 utc | codebeaker | … I guess it's normal, completely normal to pick up these interations differently - I had the UI in mind that a moderator would see anything he is able to moderate, online - typical webform… |
| 2010-10-14 15:31:11 utc | jmettraux | maybe playing with ruote-kit might help |
| 2010-10-14 15:31:15 utc | tosch_le_ | that ui may be built easily with ruote – or a state machine |
| 2010-10-14 15:31:23 utc | jmettraux | it comes with a "worklist" |
| 2010-10-14 15:31:35 utc | codebeaker | ah, awesome - that sounds exactly like what I had in mind |
| 2010-10-14 15:31:50 utc | tosch_le_ | if you're using rails, have a look at http://github.com/tosch/ruote-on-rails (there's a branch for rails 3) |
| 2010-10-14 15:32:22 utc | tosch_le_ | it shows how to integrate ruote-kit (and therefore ruote) easily into a rails app |
| 2010-10-14 15:32:50 utc | codebeaker | tosch_le_: das wird genau perfekt |
| 2010-10-14 15:33:44 utc | codebeaker | so, thank you both - I think it's time to get outta the office now :) |
| 2010-10-14 15:33:48 utc | tosch_le_ | have fun! i have to leave now. and it would be great if you could drop in after trying and report back |
| 2010-10-14 15:34:03 utc | jmettraux | escaping as well, gute Nacht ! |
| 2010-10-14 15:34:05 utc | codebeaker | sure tosch_le_ : it's Padrino->Rails 3 port-my-app-day |
| 2010-10-14 15:34:16 utc | codebeaker | gute Nacht jungs, bis morgen hoffentlich |
| 2010-10-14 15:34:19 utc | tosch_le_ | gives us a chance to improve docs and apps |
| 2010-10-14 15:34:25 utc | tosch_le_ | ciao! |
| 2010-10-14 21:57:05 utc | rebo | is wi.fields['params']['form_not_ok'] = "true" the right way to modify the payload of a workitem before replying ? |
| 2010-10-14 22:09:45 utc | rebo | ah, need it without the params |