Hello Klaus,

On Tue, May 08, 2012 at 08:14:28AM -0700, Klaus Schmidtmamn wrote:
>
> Is there a way to combine the advantages of the storage-participant
> (central storage, show all open workitems, proceeding single steps and
> so on) with the individual implementation of a participant like
> “Klaus::SkilledParticipant” e.g. heredity?
>
> Is there a way to choose open workitems or select workitems within my
> own implementation or a participant?

Yes, "inheritance",

---8<---
module Klaus

  class SkilledParticipant < Ruote::LocalParticipant

    def on_workitem

      workitem.fields['hello'] = world

      super
    end
  end
end

# ...

$dashboard.register do
  participant /^skill_/, Klaus::SkilledParticipant
  # ...
end
--->8---

A way of grabbing those workitems afterwards:

---8<---
skilled_workitems = $dashboard.storage_participant.select { |wi|
  wi.participant_name.match(/^skill_/)
}
--->8---

Please start a new discussion thread if you have a new question, Also save
bytes by not copying mindlessly the dead part of the discussion at the bottom
of your emails.

Cheers,

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