| Class | OpenWFE::YamlParticipant |
| In: |
lib/openwfe/worklist/storeparticipant.rb
|
| Parent: | YamlFileStorage |
Implementation of a store participant stores the workitems in yaml file in a dedicated directory.
It‘s quite easy to register a YamlParticipant :
yp = engine.register_participant(:alex, YamlParticipant)
puts yp.dirname
should yield "./work/participants/alex/" (if the key :work_directory in engine.application_context is unset)
| dirname | [RW] |
The constructor for YamlParticipant awaits a dirname and an application_context. The dirname should be a simple name acceptable as a filename.
# File lib/openwfe/worklist/storeparticipant.rb, line 232
232: def initialize (dirname, application_context)
233:
234: @dirname = OpenWFE::ensure_for_filename(dirname.to_s)
235:
236: service_name = self.class.name + "__" + @dirname
237:
238: path = "/participants/" + @dirname
239:
240: super(service_name, application_context, path)
241: end