ruote log_2010-10-24

2010-10-24 01:50:03 utc hassox jmettraux: actually thsi would be better in here
2010-10-24 01:50:35 utc hassox 12:46 hassox: these things are all long running user tasks
2010-10-24 01:50:36 utc hassox 12:46 hassox: I would save the wfid in the model yeah so I can go look up the workflow item?
2010-10-24 01:50:36 utc hassox 12:47 jmettraux: it's a possibility
2010-10-24 01:50:37 utc hassox 12:47 hassox: well for example... the witnesses
2010-10-24 01:50:39 utc hassox 12:48 hassox: it could be found after the initial report that there were actually witnesses
2010-10-24 01:50:41 utc hassox 12:49 jmettraux: maybe the model could hold the wfids in an array, a model may be involved in multiple processes
2010-10-24 01:50:43 utc hassox 12:50 jmettraux: (don't know for your domain though)
2010-10-24 01:50:45 utc hassox 12:51 hassox: yeah not for this one
2010-10-24 01:50:47 utc hassox 12:51 hassox: it only has one flow
2010-10-24 01:50:49 utc hassox 12:51 hassox: when an incident occurs there's a flow to do, and then the incident is closed
2010-10-24 01:50:51 utc hassox 12:52 hassox: so, I guess the thing I'm really not sure about
2010-10-24 01:50:53 utc hassox 12:52 hassox: is, given the wfid, if an event occurs, can I lookup the workflow, and then respond to the engine?
2010-10-24 01:50:55 utc hassox 12:52 hassox: without a worker
2010-10-24 01:50:57 utc hassox 12:52 hassox: so for example
2010-10-24 01:50:59 utc hassox 12:53 hassox: the witness enters their report, and all reports are in: respond to the participant (how do I do that)
2010-10-24 01:51:01 utc hassox is that the normal way to do it?
2010-10-24 01:51:18 utc jmettraux hassox: ok
2010-10-24 01:51:28 utc hassox so
2010-10-24 01:51:31 utc hassox say the flow goes
2010-10-24 01:51:44 utc hassox worker sends "gather witness reports" to the participant
2010-10-24 01:51:55 utc hassox the participant sends an email to the user to enter their report
2010-10-24 01:52:18 utc hassox the user jumps on the site, enters their report (via a form ) and hits save
2010-10-24 01:52:29 utc hassox how does the participant now find out that the task has been done?
2010-10-24 01:52:45 utc jmettraux http://github.com/tosch/ruote-on-rails/blob/rails3/app/controllers/workitems_controller.rb
2010-10-24 01:52:59 utc jmettraux taken from ruote-on-rails
2010-10-24 01:53:20 utc hassox :)
2010-10-24 01:53:20 utc jmettraux the user's browser does a PUT on the workitem resource
2010-10-24 01:53:33 utc jmettraux usually 2 actions : save or proceed
2010-10-24 01:53:57 utc jmettraux in both cases the controller grabs the workitem (given the fei) from the storage participant
2010-10-24 01:53:57 utc hassox hrm
2010-10-24 01:54:01 utc jmettraux fills in the new fields
2010-10-24 01:54:12 utc jmettraux and update or reply
2010-10-24 01:54:14 utc hassox so, how does it know what participant it's coming from?
2010-10-24 01:54:15 utc hassox ahh
2010-10-24 01:54:23 utc jmettraux update simply saves back
2010-10-24 01:54:25 utc hassox I think I undersand
2010-10-24 01:54:33 utc hassox for each workflow, there are many fei?
2010-10-24 01:54:37 utc hassox one for each participant?
2010-10-24 01:54:44 utc jmettraux reply hands back the workitem to the engine "dear engine, let that resume in its flow"
2010-10-24 01:54:51 utc jmettraux yes
2010-10-24 01:54:58 utc jmettraux as many feis as required
2010-10-24 01:55:01 utc hassox ah there's the missing piece
2010-10-24 01:55:13 utc hassox /penny drops
2010-10-24 01:55:15 utc jmettraux of course the fei includes the wfid
2010-10-24 01:56:07 utc jmettraux the storage_participant is just a pile of work
2010-10-24 01:56:18 utc hassox yeah
2010-10-24 01:56:21 utc hassox that makes sense now
2010-10-24 01:57:07 utc jmettraux you can say things like RuoteKit.engine.storage_participant.by_participant('witness')
2010-10-24 01:58:05 utc hassox oh right
2010-10-24 01:58:07 utc hassox nice :D
2010-10-24 01:58:14 utc jmettraux or RuoteKit.storage_participant.by_field('user', 'hassox')
2010-10-24 01:58:21 utc hassox :O
2010-10-24 01:58:44 utc hassox that's awesome
2010-10-24 01:59:00 utc hassox the penny has just dropped for me on how to actually use these things in a non-automatic flow :D
2010-10-24 01:59:07 utc jmettraux cool
2010-10-24 01:59:35 utc jmettraux pushing tasks to participiants
2010-10-24 01:59:38 utc jmettraux pants
2010-10-24 01:59:41 utc jmettraux lol
2010-10-24 01:59:43 utc hassox hehe
2010-10-24 02:06:36 utc jmettraux ActiveRecordParticipant would be cool, for people storing and fetching workitems via ActiveRecord
2010-10-24 02:07:19 utc hassox how do you mean?
2010-10-24 02:07:26 utc hassox do you mean a storage backend?
2010-10-24 02:07:34 utc jmettraux not entirely
2010-10-24 02:07:45 utc jmettraux yes, you could use ruote-dm to store into the db
2010-10-24 02:07:59 utc jmettraux and then simply grab the workitem via a activerecord model
2010-10-24 02:08:02 utc hassox what's would an active record participant do?
2010-10-24 02:08:32 utc jmettraux it would receive workitems from the engine and store them in the db (activerecord)
2010-10-24 02:08:46 utc jmettraux then you'd do Workitem.find...
2010-10-24 02:09:04 utc jmettraux and leverage all the activerecord query machinery
2010-10-24 02:09:37 utc jmettraux workitems for the witnesses of that region, workitems for the user Alfred, workitems that have been untouched for more than 2 weeks, ...
2010-10-24 02:09:43 utc jmettraux (just an idea)
2010-10-24 02:10:06 utc hassox ah nice
2010-10-24 02:10:13 utc hassox that would be kinda cool
2010-10-24 02:10:37 utc hassox I could spend hours just exploring this stuf