On Mon, Aug 24, 2009 at 3:51 PM, lanfeust21<[email protected]> wrote: > > Thanks for all yours answers > i wanted to put all the paper workflow in the ruote process, it need > to begin a bit later > > i create a small test with my definition here under with a > DMParticipant. > > I cannot make it work the way i think it works.
Hello, do you mean, the way you think it should work ? I'm sorry, I didn't know you a few days ago. How could I have designed something that would fit the way you think 100% ? > the test code > is below http://gist.github.com/173704 > > > When i pass a bloc > I expect the process to stop at the first user defined as a > DmParticipant , but it does not. The only participant that expects a block is, hence the name, BlockParticipant. > When i don't pass a bloc it stop well. But it doesn't arrange me. Are you implying that passing a block prevents the flow from waiting for the participant ? > My meaning was to add a bloc of code to the DmParticipant to be able > to do what you before with the ParticipantMap. > > To be able to manage roles and authorization within like this code but > in the Participant > > class ParticipantMap > > alias :old_lookup_participant :lookup_participant > > def lookup_participant (participant_name) > > part = old_lookup_participant(participant_name) > > return part if part > > target = > ::User.find_by_login(participant_name) || > ::Group.find_by_name(participant_name) > store_name = target ? participant_name : 'unknown' > > #store_name = participant_name > > #OpenWFE::Extras::ActiveStoreParticipant.new(store_name) > OpenWFE::Extras::ArParticipant.new(store_name) > # returns an 'on the fly' participant > end > end OK, I understand that. But what don't you simply go the same way and override participant_map or provide your own implementation of it ? There is nowhere in my code where a block is passed to a participant in order to modify the behaviour of the participant_map. Now trying to run your gist, will get back to you soon. -- 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 -~----------~----~----~----~------~----~------~--~---
