I am exploring using Ryan Bates' private_pub gem to allow the server to send messages to clients about new workitems. The way I imagine it working is that Ruote would send a message when a new workitem appears to the user's browser which would then display the appropriate template that allows the user to process that workitem.
I've looked at this thread: http://groups.google.com/group/openwferu-users/browse_thread/thread/9159e802974f5aed/08d0047664f35cde But I'm not sure how to implement this. When a user creates a new paper, a workflow is launched in the controller. That workflow is then run asynchronously while the controller sends its response synchronously to the user. When the asynchronous ruote process presents a workitem to the user participant, how can I get it to launch--e.g. PrivatePub.publish_to "/messages/new", :workitem_message => "New task available." I don't want the workitem to be processed at this point, just passed to the user for processing. I know I probably need to implement a custom participant, I'm just a little unclear of how that works in the context of a Rails app using Ruote-Kit. I've looked at example participants such as the one in the thread above, but I can't make out how they work. Let me try to guess how a custom participant would work: The #on_workitem method would call PrivatePub#publish_to with the user's session id and new task. #on_cancel would cancel the workitem, perhaps after a certain amount of time had passed. #on_reply would define what to do with the processed workitem before continuing. Then I would need to implement a receiver that would be called by the controller when the user submits the processed workitem. How would this receiver respond to the correct workitem? I assume that would be defined by #workitem_from_msg in the example http://ruote.rubyforge.org/implementing_participants.html#on_reply -- 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
