> Maybe simply letting the workitem in the journalist or redaction  
store
 > is sufficient for you.

Well, in fact, this discussion is a bit theoretical now -- I'm not  
sure I need it (now that you've added the pick functionality), but  
thanks for helping me understand it :-)

Anyway, for the archives, I could do it like this:

In Densha's workitem_controller.rb:

   def update
     :
     user = session[:user]
     :
     workitem.touch # setting last_modified to now

     # NEW: REMEMBER WHO'S SAVED THIS
     fields['_last_modified_by'] = user.name

     workitem.replace_fields fields # calls workitem.save!
     :
   end

And in my process definition:

   sequence do
     # Step 1: have any editor (like Alice or Bob) pick this workitem
     # from the "redaction" store, to define the headline
     participant  "redaction", :activity => "request new newspaper  
article"
     set :f => "_editor", :value => "${f:_last_modified_by}"

     # Step 2: have any journalist (like Charley or Eve) pick this  
workitem
     # from the "journalist" store to start writing it
     participant "journalist" :activity => "write"
     set :f => "_writer", :value => "${f:_last_modified_by}"

     # Step 3: have the editor from step 1 comment on it
     participant "${f:_editor}", :activity => "comment"

     # Step 4: have the journalist from step 2 revise the article
     participant "${f:_writer}", :activity => "revise"

     # Step 5: have the editor from step 1 approve it
     participant "${f:_editor}", :activity => "approve"
   end

There might very well be some better place to set the value for  
"_last_modified_by" (or maybe the name doesn't even need to be saved  
into the workitem fields at all), but at least the above describes  
what I was trying to explain :-)

Ciao!
Arjan.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to