examples/engine_template.rb in ruote-0.9.19 vs examples/engine_template.rb in ruote-0.9.20

- old
+ new

@@ -1,15 +1,14 @@ require 'rubygems' # - # if OpenWFEru was installed via 'gem' + # if ruote was installed via sudo gem install ruote # -# setting up an OpenWFEru engine, step by step +# setting up a ruote engine, step by step -require 'openwfe/engine/engine' -require 'openwfe/engine/file_persisted_engine' +require 'openwfe/engine/fs_engine' require 'openwfe/participants/participants' # # === the ENGINE itself @@ -88,22 +87,16 @@ # an in-memory, totally transient engine # # might be ideal for an embedded workflow engine with short lived # process definitions to run -#engine = OpenWFE::FilePersistedEngine.new -#engine = OpenWFE::FilePersistedEngine.new(application_context) +engine = OpenWFE::FsPersistedEngine.new +#engine = OpenWFE::FsPersistedEngine.new(application_context) # # a file persisted engine, slow, used only within unit tests # do not use - -engine = OpenWFE::CachedFilePersistedEngine.new -#engine = OpenWFE::CachedFilePersistedEngine.new(application_context) # - # a file persisted engine, with an in-memory cache. - # use that - # # persistence is done by default under ./work/ at_exit do # # making sure that the engine gets properly stopped when @@ -133,50 +126,20 @@ #engine.init_service("history", FileHistory) # # dumps all the process history in a file name "history.log" # in the work directory -# -- process journaling -#require 'openwfe/expool/journal' -#engine.init_service("journal", Journal) - # - # activates 'journaling', - # - # see http://openwferu.rubyforge.org/journal.html - # - # Journaling has a cost in terms of performace. - # Journaling should be used only in case you might want to migrate - # [segments of] running processes. - # -#engine.application_context[:keep_journals] = true - # - # if set to true, the journal of terminated processes will be kept - # (but moved by default to ./work/journal/done/) - - # # === some LISTENERS # # listeners 'receive' incoming workitems (InFlowWorkItem coming back from # participants or LaunchItem requesting the launch of a particular flow) # #require 'openwfe/listeners/listeners' -#sl = OpenWFE::SocketListener.new( -# "socket_listener", @engine.application_context, 7008) -#engine.add_workitem_listener(sl) - # - # adding a simple SocketListener on port 7008 - -#require 'openwfe/listeners/socketlisteners' -# -#engine.add_workitem_listener(OpenWFE::SocketListener) - # - # adding a SocketListener on the default port 7007 - #engine.add_workitem_listener(OpenWFE::FileListener, "500") # # listening for workitems (coming as within YAML files dropped in the # default ./work/in directory) # @@ -233,10 +196,10 @@ # the participant "away" listens for workitems on port 7009 of # host 'target.host.co.jp', our SocketParticipant will dispatch # the workitem to it over TCP -engine.reschedule +engine.reload # # this method has to be called after all the participants have been # added, it looks for temporal expressions (sleep, cron, ...) to # reschedule.