| 2010-05-14 02:21:42 utc | hansen_ | hello John |
| 2010-05-14 02:23:32 utc | jmettraux | hello ! |
| 2010-05-14 02:24:31 utc | hansen_ | I think I need your help. |
| 2010-05-14 02:24:38 utc | jmettraux | ok |
| 2010-05-14 02:30:48 utc | hansen_ | how can I implementations a approve chain,is there some suggestion? thank you |
| 2010-05-14 02:32:20 utc | jmettraux | standard pattern : http://gist.github.com/400742 |
| 2010-05-14 02:33:01 utc | jmettraux | where "work", "review" and "done" are participants |
| 2010-05-14 02:33:17 utc | jmettraux | the field "approved" is meant to be set by the "review" participant |
| 2010-05-14 02:33:42 utc | hansen_ | But I have a lot of people |
| 2010-05-14 02:33:48 utc | jmettraux | ? |
| 2010-05-14 02:35:16 utc | hansen_ | how to build the relation between people and participant? |
| 2010-05-14 02:35:32 utc | jmettraux | use a storage participant |
| 2010-05-14 02:35:59 utc | jmettraux | then in your rails application use some logic to decide which user has the right to view which workitem |
| 2010-05-14 02:36:35 utc | jmettraux | RuoteKit.storage_participant.select { |wi| wi.participant_name == 'review' } |
| 2010-05-14 02:36:37 utc | jmettraux | for example |
| 2010-05-14 02:36:50 utc | jmettraux | or simply, if you want to use directly user names |
| 2010-05-14 02:37:16 utc | jmettraux | RuoteKit.storage_participant.select { |wi| wi.participant_name == current_user_name } |
| 2010-05-14 02:37:45 utc | jmettraux | easier : |
| 2010-05-14 02:38:01 utc | jmettraux | RuoteKit.storage_participant.by_participant('review') |
| 2010-05-14 02:38:13 utc | jmettraux | will return all the workitems where participant name is "review" |
| 2010-05-14 02:38:39 utc | jmettraux | these are just examples |
| 2010-05-14 02:41:07 utc | jmettraux | another technique is to have participant names mapped to groups of people |
| 2010-05-14 02:41:15 utc | jmettraux | and then have a workitem field named 'user' |
| 2010-05-14 02:41:38 utc | jmettraux | when this field is empty it means that the workitem is not assigned to a user... |
| 2010-05-14 02:41:53 utc | jmettraux | there are many techniques, your imagination is the limit |
| 2010-05-14 02:45:34 utc | hansen_ | OK ,I think I understand now |
| 2010-05-14 02:45:44 utc | jmettraux | great ! |
| 2010-05-14 02:46:37 utc | hansen_ | I user one participant mapped to a goup of people |
| 2010-05-14 02:46:53 utc | hansen_ | use |
| 2010-05-14 02:46:58 utc | jmettraux | ok |
| 2010-05-14 02:48:38 utc | jmettraux | is Eric Woo a friend of you ? |
| 2010-05-14 02:49:05 utc | hansen_ | Each people have a varible "degree to" control it's Right |
| 2010-05-14 02:49:12 utc | hansen_ | no |
| 2010-05-14 03:11:34 utc | hansen_ | oh i'm sorry Eric Woo is my friend,i just now! |
| 2010-05-14 03:11:39 utc | jmettraux | :) |
| 2010-05-14 03:14:38 utc | hansen_ | Our team have five people |
| 2010-05-14 03:15:23 utc | jmettraux | are you going to Ruby Conf China 2010 ? |
| 2010-05-14 03:15:48 utc | jmettraux | hello ericwoo |
| 2010-05-14 03:16:12 utc | ericwoo | hi,john |
| 2010-05-14 03:16:59 utc | hansen_ | Sorry,I don't know that? where and when? thank yo |
| 2010-05-14 03:19:20 utc | jmettraux | hansen_: http://twitter.com/Kozmasumitsu/status/12654076351 |
| 2010-05-14 03:21:49 utc | hansen_ | Oh,twitter is Forbid in china |
| 2010-05-14 03:21:55 utc | jmettraux | :( |
| 2010-05-14 03:22:11 utc | jmettraux | it says "RubyConf China 2010, June 26 at Shanghai TV University, International conf room." |
| 2010-05-14 03:22:28 utc | jmettraux | but the website http://rubyconfchina.org/ is empty :( |
| 2010-05-14 03:23:10 utc | hansen_ | I found that too |
| 2010-05-14 03:38:07 utc | ericwoo | i still want to know if the table of decision_participant can get the data from database. |
| 2010-05-14 04:16:12 utc | jmettraux | ericwoo: it sould be easy to implement |
| 2010-05-14 04:16:27 utc | jmettraux | but for now, the decision participant only reads from CSV files |
| 2010-05-14 04:16:54 utc | jmettraux | somehow, I don't think you need DecisionParticipant for that "formally" |
| 2010-05-14 04:17:05 utc | jmettraux | a participant is like a function |
| 2010-05-14 04:17:34 utc | jmettraux | it takes as input a workitem and some "other elements" and gives back a [modified] workitem |
| 2010-05-14 04:18:02 utc | jmettraux | some "other elements" could be "fetching some configuration from a database" |
| 2010-05-14 04:20:40 utc | jmettraux | for example : http://gist.github.com/400811 |
| 2010-05-14 04:21:26 utc | jmettraux | in this WooDecisionParticipant, some hypothetical SalesResult [activerecord] model is consulted to determine the sales result for this year |
| 2010-05-14 04:21:55 utc | jmettraux | if the amount is superior to 10000, then the participant "decides" to set the field "approved" to true |
| 2010-05-14 04:22:22 utc | jmettraux | it then replies to the engine (lets the process continue) |
| 2010-05-14 05:41:17 utc | ericwoo | hi,john,thank you very much. |
| 2010-05-14 05:41:25 utc | jmettraux | you're welcome |