On Mon, Aug 06, 2012 at 11:15:57AM -0700, laurent wrote:
>
> I already use "ruote-on-rails" as a starting point for my application.
> I have no idea if I go in a good direction : In this application, the
> humain user will be some kind of Ruote::Participant. They will receive the
> workitem, and has to do somethings to do with it (publish and record report
> activity).
>
> These "HumainParticipant" will have more attributes (name,
> fonction, autorisation, etc ...) , and I would like to store these
> suplementary attributes in ActiveRecord.
> It was possible with the "LocalParticipant" Module, but WorkItem is not
> save in ruote. With the "StorageParticipant", WorkItem is save, but I can
> not derived anymore my "HumainParticipant" form a "RuoteParticipant".
>
> I will try to just have a reference (external key id) of the
> RuoteParticipant in a field (attribute) of my "HumainParticipant" and tell
> you if it's work.

Hello Laurent,

I've quite a few deployments where there was a User model used in
conjunction with the StorageParticipant. The user name corresponded to the
participant name (or the name of the group the user is in corresponded to the
participant name).

The user class had some sort of

---8<---
class User < ActiveRecord::Base

  # ...

  # Returns all the workitems this user can deal with (either directly
  # or via its group).
  #
  def workitems

    RuoteKit.engine.storage_participant.by_participant(self.name) +
    RuoteKit.engine.storage_participant.by_participant(self.group_name)
  end
end
--->8---

Many ways to skin a cat.


Best regards,

--
John Mettraux - http://lambda.io/jmettraux

-- 
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

Reply via email to