| 2010-11-09 23:35:06 utc | fixr | good morning jmettraux! |
| 2010-11-09 23:35:19 utc | jmettraux | fixr: good evening ! |
| 2010-11-09 23:35:23 utc | jmettraux | how are you doing ? |
| 2010-11-09 23:36:16 utc | fixr | doing well, thanks! Playing around with Ruote for a change :) |
| 2010-11-09 23:36:30 utc | fixr | where's the best place to submit a bugfix? |
| 2010-11-09 23:36:49 utc | fixr | I'm not sure if the mailing list is ok for that |
| 2010-11-09 23:37:08 utc | fixr | and I'm not very skilled with git/github (yet) |
| 2010-11-09 23:37:19 utc | jmettraux | the mailing list is OK |
| 2010-11-09 23:37:39 utc | jmettraux | it's probably the easiest, you can use your favourite email client ;-) |
| 2010-11-09 23:37:41 utc | fixr | don't want to mess with a wrong push or something :) |
| 2010-11-09 23:37:49 utc | fixr | hehe alright |
| 2010-11-09 23:39:58 utc | fixr | found a bug on workitem.command = x |
| 2010-11-09 23:40:02 utc | fixr | here: https://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/workitem.rb#L260 |
| 2010-11-09 23:40:26 utc | fixr | it's not working when you use a "jump" expression |
| 2010-11-09 23:41:53 utc | jmettraux | OK, can you wrap that in an email to the mailing list ? |
| 2010-11-09 23:42:39 utc | fixr | will do :) |
| 2010-11-09 23:42:47 utc | fixr | bugfix is here, just in case: https://gist.github.com/670066 |
| 2010-11-09 23:43:19 utc | jmettraux | Thanks, but I'll need to write a test case first |
| 2010-11-09 23:43:39 utc | fixr | sure thing :). I'll leave it on the mailing list |
| 2010-11-09 23:45:07 utc | fixr | one more thing... I'm working currently on a validator. In order to get to a participant, certain conditions apply |
| 2010-11-09 23:45:52 utc | fixr | not sure if it'd be of any use to anyone else, but if you think so, we can discuss implementing it into ruote |
| 2010-11-09 23:47:09 utc | fixr | I'm doing it by wrapping it up on a participant name "validator", but it could be integrated into all participants as a parameter |
| 2010-11-09 23:47:29 utc | jmettraux | participant :ref => 'fixr', :if => '${light} == green' |
| 2010-11-09 23:47:31 utc | jmettraux | ? |
| 2010-11-09 23:47:50 utc | fixr | participant :ref => "foo", :validate => ["bar_1", "bar_2"] |
| 2010-11-09 23:48:02 utc | jmettraux | what does it mean ? |
| 2010-11-09 23:49:59 utc | jmettraux | what are bar_1 and bar_2 ? |
| 2010-11-09 23:50:59 utc | fixr | it's more suited for a case when you need to validate lots of fields and don't want to do nested if's |
| 2010-11-09 23:51:02 utc | fixr | those would be fields |
| 2010-11-09 23:51:14 utc | fixr | validates presence of |
| 2010-11-09 23:51:36 utc | fixr | :validate_presence_of => ["field_1","field_2"] |
| 2010-11-09 23:51:50 utc | jmettraux | what does happen if the fields are not present ? |
| 2010-11-09 23:52:21 utc | fixr | goes back to previous stage, setting an error field |
| 2010-11-09 23:52:38 utc | fixr | or "referer" participant |
| 2010-11-09 23:53:20 utc | fixr | as I said, I'm not sure if it's too specific to implement ruote-wide, but it's an idea |
| 2010-11-09 23:53:22 utc | jmettraux | this is putting data concerns into the process definitions |
| 2010-11-09 23:53:36 utc | jmettraux | I'd prefer raising an exception in the participant |
| 2010-11-09 23:54:14 utc | jmettraux | error "missing field" :unles => "${field_1}" |
| 2010-11-09 23:54:15 utc | jmettraux | maybe |
| 2010-11-09 23:56:24 utc | fixr | that would be better, indeed |
| 2010-11-09 23:57:30 utc | jmettraux | I want to avoid having too much data-management into process definitions |
| 2010-11-10 00:01:39 utc | fixr | I agree, it's a good design choice :). I think of definitions as the "railroad". The train would be the data thing |
| 2010-11-10 00:02:26 utc | jmettraux | +1 |
| 2010-11-10 00:02:28 utc | jmettraux | exactly ! |
| 2010-11-10 00:08:06 utc | fixr | well, the :validate_presence_of on any StorageParticipant was only a crazy idea :) |
| 2010-11-10 00:08:10 utc | fixr | The way I'm doing it is with a LocalParticipant named "validator" |
| 2010-11-10 00:09:03 utc | fixr | like this: validator :for => "participant_tag", :presence => "field_1, field_2" |
| 2010-11-10 00:11:03 utc | fixr | if it succeeds, sends to participant_tag. Otherwise, sends to back to the referer |
| 2010-11-10 00:11:27 utc | jmettraux | https://gist.github.com/670101 |
| 2010-11-10 00:13:29 utc | fixr | exactly! something like that :) |
| 2010-11-10 00:13:40 utc | jmettraux | https://gist.github.com/670103 |
| 2010-11-10 00:15:26 utc | jmettraux | maybe :present is not a good option name |
| 2010-11-10 00:19:28 utc | fixr | only to follow rails's conventions hehe |
| 2010-11-10 00:19:53 utc | fixr | :not_empty might work as well |
| 2010-11-10 00:22:37 utc | fixr | thanks. That latest gist clears things up quite a lot |
| 2010-11-10 00:23:34 utc | fixr | raising an exception it's a much better implementation. I sometimes forget Ruote is not only for websites! |