| 2010-05-06 01:43:26 utc | jmettraux | brain_in_vat: hello, I just saw your question |
| 2010-05-06 01:43:38 utc | brain_in_vat | hi, I worked it out |
| 2010-05-06 01:43:41 utc | brain_in_vat | the one from yesterday? |
| 2010-05-06 01:43:45 utc | jmettraux | ah great |
| 2010-05-06 01:44:11 utc | jmettraux | yes, http://ruote.rubyforge.org/irclogs/ruote_2010-05-04.txt |
| 2010-05-06 01:45:09 utc | brain_in_vat | ha, clever |
| 2010-05-06 01:45:32 utc | brain_in_vat | well, fyi, I lost time on the expression interpretation on particpants |
| 2010-05-06 01:46:00 utc | jmettraux | ok |
| 2010-05-06 01:46:01 utc | brain_in_vat | :if => '${f:new_pages.size} != 0' |
| 2010-05-06 01:46:10 utc | brain_in_vat | hang on, coffee |
| 2010-05-06 01:47:32 utc | brain_in_vat | I had to fiddle before I realised ${f:new_pages.any?} or ${f:new_pages.size} > 0 weren't going to work |
| 2010-05-06 01:48:07 utc | jmettraux | ${r:xxx} could maybe help |
| 2010-05-06 01:48:29 utc | brain_in_vat | that goes into ruby |
| 2010-05-06 01:48:30 utc | brain_in_vat | ? |
| 2010-05-06 01:48:34 utc | jmettraux | yes |
| 2010-05-06 01:48:48 utc | brain_in_vat | right, couldn't find that in the docs |
| 2010-05-06 01:48:50 utc | jmettraux | let me look up a link |
| 2010-05-06 01:49:23 utc | jmettraux | http://ruote.rubyforge.org/dollar.html last section |
| 2010-05-06 01:49:48 utc | brain_in_vat | right |
| 2010-05-06 01:49:55 utc | brain_in_vat | for some reason I find the documentation hard to use |
| 2010-05-06 01:50:20 utc | brain_in_vat | anyway, when I have better suggestions (clearer ones) I'll let you know |
| 2010-05-06 01:50:25 utc | jmettraux | thanks |
| 2010-05-06 01:50:27 utc | brain_in_vat | ACTION is working on his content framework today |
| 2010-05-06 01:50:50 utc | jmettraux | there is still the wiki |
| 2010-05-06 01:52:22 utc | jmettraux | documentation will be easy to use when it will be able to read the reader's mind |
| 2010-05-06 01:53:22 utc | brain_in_vat | :) |
| 2010-05-06 01:53:48 utc | threetee | hey jmettraux, do you have time for me to run some ruote/rails integration questions by you? |
| 2010-05-06 01:54:03 utc | jmettraux | threetee: please fire |
| 2010-05-06 01:54:09 utc | threetee | great |
| 2010-05-06 01:54:37 utc | threetee | so I have ruote, ruote-kit and ruote-on-rails all up and running |
| 2010-05-06 01:54:51 utc | threetee | I've started my ruote worker (rake ruote_kit:run_worker) |
| 2010-05-06 01:55:28 utc | threetee | I've defined my participants and created my process definition |
| 2010-05-06 01:55:32 utc | jmettraux | ACTION hopes he can answer {ruote|deamon}-kit questions efficiently |
| 2010-05-06 01:56:01 utc | threetee | and I've wired up a controller to kick off a ruote process on an action |
| 2010-05-06 01:57:15 utc | threetee | I also have created a workitem resource as per http://groups.google.com/group/openwferu-users/msg/ca95a5f87c575a57 so I can monitor the contents of the queue |
| 2010-05-06 01:57:46 utc | threetee | so my action kicks off the process, and I can see the files being created in the storage location (using filesystem storage) |
| 2010-05-06 01:58:12 utc | threetee | but when I try to view the workitems a la the above, no workitems are shown |
| 2010-05-06 01:58:47 utc | jmettraux | is there an error file created in your filesystem storage ? |
| 2010-05-06 01:59:20 utc | threetee | checking... |
| 2010-05-06 01:59:29 utc | jmettraux | the other way is to ask the process about its errors : p engine.process(wfid).errors.size |
| 2010-05-06 02:01:42 utc | threetee | I don't see any errors: http://pastie.org/947805 |
| 2010-05-06 02:02:27 utc | jmettraux | ah, there are two workitems |
| 2010-05-06 02:02:36 utc | jmettraux | what does your workitem controller look like ? |
| 2010-05-06 02:03:36 utc | threetee | http://pastie.org/947808 |
| 2010-05-06 02:03:59 utc | jmettraux | looks ideal |
| 2010-05-06 02:04:11 utc | threetee | ah crap |
| 2010-05-06 02:04:14 utc | threetee | I just figured it out |
| 2010-05-06 02:04:17 utc | threetee | my fault |
| 2010-05-06 02:05:03 utc | threetee | my view was screwed up :( |
| 2010-05-06 02:05:19 utc | threetee | sorry about that |
| 2010-05-06 02:05:27 utc | jmettraux | no worries ! |
| 2010-05-06 02:07:55 utc | threetee | one other question: is it possible to stuff an activerecord item into a workitem? |
| 2010-05-06 02:08:17 utc | jmettraux | the workitem must be serializable as JSON |
| 2010-05-06 02:08:24 utc | threetee | got it |
| 2010-05-06 02:08:39 utc | threetee | so as long as I can serialize the object, I can assign it to a workitem field and pass it around all I want |
| 2010-05-06 02:09:03 utc | jmettraux | somehow yes |
| 2010-05-06 02:09:11 utc | jmettraux | I tend to "reference" stuff |
| 2010-05-06 02:09:21 utc | jmettraux | workitem.fields['audit_id'] = 12 |
| 2010-05-06 02:09:38 utc | jmettraux | Audit = Audit.find(workitem.fields['audit_id']) |
| 2010-05-06 02:09:42 utc | threetee | that makes sense |
| 2010-05-06 02:09:55 utc | jmettraux | I even re-open the workitem class sometimes |
| 2010-05-06 02:10:19 utc | jmettraux | def audit; Audit.find(self.fields['audit_id']); end |
| 2010-05-06 02:10:26 utc | jmettraux | then |
| 2010-05-06 02:10:31 utc | jmettraux | audit = workitem.audit |
| 2010-05-06 02:10:36 utc | jmettraux | and so on |
| 2010-05-06 02:10:45 utc | threetee | slick |
| 2010-05-06 02:13:12 utc | threetee | I think I'm well on my way to integrating ruote with my rails app now :) |
| 2010-05-06 02:13:15 utc | threetee | one more question though |
| 2010-05-06 02:14:02 utc | threetee | my first stab at a pattern to kick off a process looks like this: |
| 2010-05-06 02:14:13 utc | threetee | controller action: http://pastie.org/947820 |
| 2010-05-06 02:14:17 utc | threetee | model: http://pastie.org/947821 |
| 2010-05-06 02:15:33 utc | threetee | the process diagram looks somewhat like this: http://imgur.com/iDlIG (it's changed somewhat since I drew that one, but this gets the point across) |
| 2010-05-06 02:16:38 utc | threetee | because the process involves several human participants, it could last for some time |
| 2010-05-06 02:16:52 utc | threetee | what I'm wondering about is how people usually handle saving the object to the database |
| 2010-05-06 02:17:32 utc | threetee | do they save only after the ruote process finishes successfully, do they save before like I'm doing in this example? |
| 2010-05-06 02:17:54 utc | jmettraux | I tend to save before |
| 2010-05-06 02:18:12 utc | threetee | seems like if one saves before, one would need to implement a state machine to reflect that the object was still being processed |
| 2010-05-06 02:18:16 utc | jmettraux | the process instances "brush" the business objects state |
| 2010-05-06 02:18:39 utc | jmettraux | you could have a simple "work_in_process" field |
| 2010-05-06 02:18:46 utc | jmettraux | or something like that |
| 2010-05-06 02:19:14 utc | threetee | right, just a flag to indicate that it was still in the ruote process |
| 2010-05-06 02:19:17 utc | threetee | makes sense |
| 2010-05-06 02:19:23 utc | jmettraux | or the process, at its end, pushes/copies the objects/records/resources to a new place .... |
| 2010-05-06 02:19:23 utc | threetee | cool, so I'm not too far off then? |
| 2010-05-06 02:19:36 utc | jmettraux | looks good ! |
| 2010-05-06 02:19:56 utc | threetee | excellent, thanks for the advice |
| 2010-05-06 02:20:00 utc | jmettraux | you'll come up with your own best practices ;) |
| 2010-05-06 02:20:10 utc | threetee | haha I prefer to avoid reinventing the wheel though |
| 2010-05-06 02:20:41 utc | threetee | but yes, best practices are often very subjective |
| 2010-05-06 02:21:23 utc | jmettraux | :) |
| 2010-05-06 02:22:37 utc | jmettraux | with rails and workitems, I have three techniques |
| 2010-05-06 02:23:01 utc | jmettraux | 1) raw workitem view (the workitem and nothing else) |
| 2010-05-06 02:23:39 utc | jmettraux | 2) the workitem in relation with a resource /resource/xxx/edit?workitem=20090405-wada!!0_0 |
| 2010-05-06 02:24:16 utc | jmettraux | 3) a special "form" resources determined based on the "task" field (a convention) |
| 2010-05-06 02:24:59 utc | jmettraux | in 1) there is no correlation at all |
| 2010-05-06 02:25:15 utc | jmettraux | in 2) there is a 1 to 1 correlation, 1 resource, 1 workitem |
| 2010-05-06 02:25:32 utc | jmettraux | in 3) you can have 1 workitem and 1+ resources |
| 2010-05-06 02:26:24 utc | jmettraux | sorry for the vagueness |
| 2010-05-06 02:29:58 utc | threetee | np, I'll work on grokking this |
| 2010-05-06 02:30:26 utc | threetee | I understand 1 and 2 |
| 2010-05-06 02:30:29 utc | threetee | still working out 3 |
| 2010-05-06 12:36:56 utc | kennethkalmer | /join #rdrc |
| 2010-05-06 12:37:00 utc | kennethkalmer | fail |
| 2010-05-06 12:37:11 utc | kennethkalmer | how goes over here? |
| 2010-05-06 12:37:51 utc | jmettraux | trying |
| 2010-05-06 12:38:16 utc | jmettraux | not very populated |
| 2010-05-06 12:38:20 utc | kennethkalmer | anything i can help with ? |
| 2010-05-06 12:38:23 utc | kennethkalmer | not yet |
| 2010-05-06 12:38:28 utc | jmettraux | ? |
| 2010-05-06 12:39:11 utc | kennethkalmer | trying... |
| 2010-05-06 12:39:29 utc | jmettraux | ah, joined #rdrc as well |
| 2010-05-06 12:45:17 utc | jmettraux | I'm having good fun with beanstalkd |
| 2010-05-06 12:46:44 utc | jmettraux | lovely piece of software |
| 2010-05-06 12:49:35 utc | jmettraux | tosch_le: hello ! |
| 2010-05-06 12:49:44 utc | tosch_le | hi! |
| 2010-05-06 12:49:50 utc | tosch_le | doing fine? |
| 2010-05-06 12:50:21 utc | jmettraux | doing fine, how about you ? |
| 2010-05-06 12:50:42 utc | tosch_le | i'm doing fine, thanks |
| 2010-05-06 12:51:39 utc | jmettraux | what are "sixes" ? Sixpacks ? |
| 2010-05-06 13:23:34 utc | kennethkalmer | no idea |
| 2010-05-06 23:11:06 utc | threetee | hey kennethkalmer, mind if I pick your brain some more about ruote-kit/rails? |
| 2010-05-06 23:18:07 utc | threetee | so I have my current rails app up at http://github.com/threetee/ruote-rails-test |
| 2010-05-06 23:18:19 utc | threetee | the process I'm looking to implement is at http://imgur.com/F7268 |
| 2010-05-06 23:18:23 utc | jmettraux | hello |
| 2010-05-06 23:18:29 utc | threetee | hi jmettraux |
| 2010-05-06 23:18:53 utc | threetee | I was just bugging kennethkalmer about a ruote-kit and rails integration question |
| 2010-05-06 23:19:22 utc | jmettraux | ahh |
| 2010-05-06 23:19:30 utc | jmettraux | he's still awake ? |
| 2010-05-06 23:19:35 utc | threetee | I don't know |
| 2010-05-06 23:19:36 utc | threetee | :) |
| 2010-05-06 23:19:54 utc | jmettraux | 0125 for him :) |
| 2010-05-06 23:20:07 utc | threetee | he's still in the room, so I figured I'd throw this out there and send it to the list if he wasn't around :) |
| 2010-05-06 23:21:35 utc | threetee | so my EmailsController#create action kicks off a ruote process like it should |
| 2010-05-06 23:21:43 utc | threetee | john, this is what I was asking you about the other day |
| 2010-05-06 23:21:48 utc | jmettraux | ok |
| 2010-05-06 23:22:31 utc | threetee | but I'm a little fuzzy on how I interact with the ruote engine throughout the life of the process |
| 2010-05-06 23:22:47 utc | threetee | for example, the next step in the process is for the requestor to upload some forms |
| 2010-05-06 23:23:34 utc | threetee | I want to tie that to another controller action somewhere, but I'm having difficulty figuring out what the right method is to progress the workflow |
| 2010-05-06 23:24:06 utc | threetee | I'm also realizing that I need some way for the user's form uploads to be associated with the right wfid |
| 2010-05-06 23:24:51 utc | jmettraux | ok |
| 2010-05-06 23:24:59 utc | jmettraux | should we discuss the upload thing ? |
| 2010-05-06 23:25:08 utc | threetee | sure |
| 2010-05-06 23:25:29 utc | jmettraux | may the user upload at any time or does the process grant them the right at some point ? |
| 2010-05-06 23:26:30 utc | threetee | the user should only be able to upload after the email request...otherwise, it would be difficult to associate the uploaded forms with the email in question |
| 2010-05-06 23:26:55 utc | jmettraux | then he has a workitem with a task like "please upload docs related to x" |
| 2010-05-06 23:27:08 utc | threetee | right |
| 2010-05-06 23:27:28 utc | jmettraux | the form/edit view for this workitem should allow for upload and keep track (in the workitem) of the uploaded documents |
| 2010-05-06 23:27:53 utc | jmettraux | it could also keep track of the upload docs [URIs] in the underlying record (if you went that way) |
| 2010-05-06 23:28:07 utc | threetee | okay, makes sense...I assumed that I would provide the user with a specific URL to use for the form upload, that included the wfid |
| 2010-05-06 23:28:33 utc | jmettraux | it does /workitems/{workitem-fei}/edit |
| 2010-05-06 23:28:37 utc | jmettraux | somehow |
| 2010-05-06 23:29:06 utc | threetee | I see |
| 2010-05-06 23:29:41 utc | threetee | it could also be /forms/new?fei={workitem-fei}, yes? |
| 2010-05-06 23:29:57 utc | jmettraux | if you have a forms controller yes |
| 2010-05-06 23:30:28 utc | threetee | okay, I'm with you so far |
| 2010-05-06 23:31:02 utc | threetee | so in whatever controller action gets run to accept the user's form, it stores the form, then updates the workitem with the form ID |
| 2010-05-06 23:31:55 utc | jmettraux | in my stuff, the forms are completely virtual, they are not stored, the incoming params are used to complete the workitem (and sometimes upload files) |
| 2010-05-06 23:33:55 utc | threetee | I would love to do it that way, but unfortunately I work for a company with lawyers that like to have signed forms. I'm lucky to be using scanned/uploaded forms. :| |
| 2010-05-06 23:34:07 utc | jmettraux | ouch |
| 2010-05-06 23:34:31 utc | jmettraux | so when you say form, it's a "scanned form" |
| 2010-05-06 23:35:07 utc | threetee | correct, so I'm planning to set up the forms resource and use paperclip to store the scanned attachments |
| 2010-05-06 23:35:24 utc | jmettraux | then your description makes complete sense |
| 2010-05-06 23:36:43 utc | threetee | cool |
| 2010-05-06 23:37:01 utc | threetee | so how do I retrieve the workitem by fei? |
| 2010-05-06 23:38:08 utc | jmettraux | RuoteKit.storage_participant.find(fei) |
| 2010-05-06 23:38:11 utc | jmettraux | let me double-check |
| 2010-05-06 23:39:26 utc | threetee | I just checked the barley source, and I see Ruote::FlowExpressionId.from_id(fei, ENGINE.context.engine_id) |
| 2010-05-06 23:39:44 utc | jmettraux | this creates a FlowExpressionId instance |
| 2010-05-06 23:40:08 utc | jmettraux | RuoteKit.storage_participant[fei] |
| 2010-05-06 23:40:11 utc | jmettraux | is the right thing |
| 2010-05-06 23:49:49 utc | jmettraux | threetee: may I link people to your http://github.com/threetee/ruote-rails-test ? |
| 2010-05-06 23:50:34 utc | threetee | sure, but maybe you should wait until it does more cool stuff :) |
| 2010-05-06 23:50:42 utc | jmettraux | right |
| 2010-05-06 23:50:48 utc | threetee | name could probably be better too |
| 2010-05-06 23:51:25 utc | threetee | but yes, once I get everything working, it would be a good resource for n00bs like me |
| 2010-05-06 23:51:46 utc | jmettraux | you won't be a n00b at that point ;) |
| 2010-05-06 23:51:54 utc | threetee | I certainly hope not! |
| 2010-05-06 23:58:54 utc | threetee | so if I wanted to send an email to the requestor that contained a link they could use to upload their forms |
| 2010-05-06 23:59:01 utc | threetee | that link would of course need to refer to the fei |
| 2010-05-06 23:59:24 utc | jmettraux | do you need a String version of the fei ? |
| 2010-05-07 00:00:44 utc | threetee | yes |
| 2010-05-07 00:00:50 utc | threetee | and to_s isn't giving me what I would expect |
| 2010-05-07 00:01:06 utc | jmettraux | fei.to_storage_id |
| 2010-05-07 00:01:30 utc | jmettraux | then there is Ruote::FlowExpressionId.from_s(s_fei) IIRC |
| 2010-05-07 00:02:09 utc | jmettraux | wrong |
| 2010-05-07 00:02:18 utc | jmettraux | it's Ruote::FlowExpressionId.from_id(s) |
| 2010-05-07 00:02:43 utc | jmettraux | http://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/fei.rb |
| 2010-05-07 00:03:08 utc | jmettraux | if a need for some shortcut appears, please tell me |