examples/engine_template.rb in openwferu-0.9.12 vs examples/engine_template.rb in openwferu-0.9.12.863
- old
+ new
@@ -14,10 +14,11 @@
#
# === the ENGINE itself
#
#application_context = {}
+
#application_context[:work_directory] = "work"
#
# OpenWFEru engines take one optional argument : application_context
#
# the following engine constructions do not use this argument,
@@ -26,28 +27,57 @@
# engine = OpenWFE::Engine.new(application_context)
#
# ...
#
+#application_context[:remote_definitions_allowed] = true
+ #
+ # unless this parameter is set to true, the engine will not accept
+ # to launch processes whose definition is given by a URL, only
+ # local process definitions (file:) or direct process definitions
+ # will be allowed.
+#application_context[:ruby_eval_allowed] = true
+ #
+ # if this parameter is set to true, evaluation of ruby code in process
+ # definition strings will be allowed as well as the ruby version of
+ # certain expression attributes like :
+ #
+ # <participant name="${ruby:LDAP::lookup(customer_id)" />
+ # or
+ # <if rtest="var % 2 == 0"> ...
+ #
+
+
#engine = OpenWFE::Engine.new
+#engine = OpenWFE::Engine.new(application_context)
#
# 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)
#
# 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
+ # Ruby exits.
+ #
+ engine.stop
+end
# -- a console
#engine.enable_irb_console
#