Hello John et. all,
So I have moved our workflows to use the built-in filters on 'edge' ruote
and it works great.
Stepping back a little though there is a little bit of confusion in my mind
about what this does in relation to what we had discussed. Specifically what
I had understood what that you were going to work on a way to filter and/or
transform the workitem fields being "given to" and/or "retrieved from" a
participant. That is a participant would have an implicit contract/interface
and the filters could be used to "force" the workitem that it receives to
abide that contract. So you could have a filter that does:
some_participant :filter => { :in => { 'global_field' => 'a_field' }, :out
=> { 'a_field' => 'a_result' } }
This would have filtered out all workitem fields other than 'global_field'
from the workitem that 'some_participant' consumes and would have renamed
the 'global_field' workitem field to 'a_field' as far as 'some_participant'
is concerned. Once 'some_participant' replies the initial workitem fields
would be "restored" and the workitem field 'a_field' would now be named
'a_result' for the next expression to pick up.
Validation would have been nice to be built in but could have been done
through participants (like my weak attempt with the
FieldDefinitionsParticipant). However it seems that you went the other route
though were filters really only validate but don't filter nor transform at
the moment. While it's great to have validation built-in into Ruote I can't
help but think that this should not be the job of filters, maybe a validate
expression would be more appropriate.
Obviously I could be completely off-base and miss the grand vision behind
the current design :) Anyway I would appreciate it if you could share some
of the rationale behind the current choices you made and where actual
filtering and transforming fit.
Thank you !
--
Raphael.
On Sun, Feb 6, 2011 at 9:54 PM, John Mettraux <[email protected]> wrote:
>
> On Fri, Feb 04, 2011 at 05:51:09PM -0800, Raphael Simon wrote:
> >
> > This looks great and seems to provide a lot of flexibility! I see that
> you
> > did end-up supporting arrays and hashes :)
> >
> > I will give this a whirl and adapt our workflows to use it.
>
> Hello,
>
> just pushed a change that lets you do things like
>
> filter :fields => "a, b, c", :type => 'string'
> filter :fields => %w[ a b c ], :type => 'string'
> filter :fields => '/^user_/', :type => 'string'
>
> filter :fields => '/^x_(.+)$/', :copy_to => 'y_\1'
>
> ...
>
>
> https://github.com/jmettraux/ruote/commit/f496d53ba0962c3f3048b09b5015e19fe07cc928
>
>
> Best regards,
>
> --
> John Mettraux - http://jmettraux.wordpress.com
>
> --
> you received this message because you are subscribed to the "ruote users"
> group.
> to post : send email to [email protected]
> to unsubscribe : send email to
> [email protected]
> more options : http://groups.google.com/group/openwferu-users?hl=en
>
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en