Class OpenWFE::Extras::ActiveStoreParticipant
In: lib/openwfe/extras/participants/activeparticipants.rb
Parent: ActiveParticipant

An extension of ActiveParticipant. It has a ‘store_name’ and it makes sure to flag every workitem it ‘consumes’ with that name (in its ‘store_name’ column/field).

This is the participant used mainly in ‘densha’ for human users.

Methods

consume   each   new  

Included Modules

Enumerable

Public Class methods

[Source]

     # File lib/openwfe/extras/participants/activeparticipants.rb, line 677
677:         def initialize (store_name)
678: 
679:             super()
680:             @store_name = store_name
681:         end

Public Instance methods

This is the method called by the OpenWFEru engine to hand a workitem to this participant.

[Source]

     # File lib/openwfe/extras/participants/activeparticipants.rb, line 687
687:         def consume (workitem)
688: 
689:             if compact_workitems
690:                 workitem.attributes["compact_workitems"] = true
691:             end
692: 
693:             Workitem.from_owfe_workitem(workitem, @store_name)
694:         end

Iterates over the workitems currently in this store.

[Source]

     # File lib/openwfe/extras/participants/activeparticipants.rb, line 699
699:         def each (&block)
700: 
701:             return unless block
702: 
703:             wis = Workitem.find_by_store_name @store_name
704: 
705:             wis.each do |wi|
706:                 block.call wi
707:             end
708:         end

[Validate]