Class Ruote::ParticipantList
In: lib/ruote/svc/participant_list.rb
Parent: Object

Tracking participants to [business] processes.

The methods here are mostly called via the engine (registering / unregistering participants) and via the dispatch_pool (when handing workitems to participants).

Methods

Classes and Modules

Class Ruote::ParticipantList::BlockParticipantContext

Public Class methods

Vanilla service initialize.

Public Instance methods

Clears this participant list.

Used by Engine#register(&block)

Returns an instance of a participant.

Used by Engine#participant_list

Returns a representation of this participant list as an array of ParticipantEntry instances.

Used by Engine#participant_list=

Takes as input an array of ParticipantEntry instances and updates this participant list with it.

See ParticipantList#list

Returns a participant instance, or nil if there is no participant for the given participant name.

Mostly a combination of lookup_info and instantiate.

Given a participant name, returns participant details.

Returns nil if there is no participant registered that covers the given participant name.

Return a list of names (regex) for the registered participants

Registers a participant. Called by Engine#register_participant.

Calls shutdown on any participant that sports this method.

Removes a participant, given via its name or directly from this participant list.

Called usually by Engine#unregister_participant.

Protected Instance methods

If the given block is nil, will return {}, else tries to determine if it‘s a single "on_workitem" block or a block that has sub-blocks, like in

  dashboard.register 'toto' do
    on_workitem do
      puts "hey I'm toto"
    end
    accept? do
      workitem.fields.length > 3
    end
  end

Fetches and returns the participant list in the storage.

[Validate]