lib/openwfe/workitem.rb in openwferu-0.9.12 vs lib/openwfe/workitem.rb in openwferu-0.9.12.863

- old
+ new

@@ -28,12 +28,10 @@ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. #++ # -# $Id: workitem.rb 3556 2006-11-13 04:15:52Z jmettraux $ -# # # "hecho en Costa Rica" # # john.mettraux@openwfe.org @@ -349,13 +347,41 @@ alias :wfdurl :workflow_definition_url alias :wfdurl= :workflow_definition_url= # - # This constructor will build an empty launchitem. + # This constructor will build an empty LaunchItem. + # # If the optional parameter process_definition is set, the # definition will be embedded in the launchitem attributes # for retrieval by the engine. + # + # There are several ways to specify the process definition. + # Here are some examples: + # + # # Use a Ruby class that extends OpenWFE::ProcessDefinition + # LaunchItem.new(MyProcessDefinition) + # + # # Provide an XML process definition as a string + # definition = """ + # <process-definition name="x" revision="y"> + # <sequence> + # <participant ref="alpha" /> + # <participant ref="bravo" /> + # </sequence> + # </process-definition> + # """.strip + # LaunchItem.new(definition) + # + # # Load an XML process definition from a local file + # require 'uri' + # LaunchItem.new(URI.new("file:///tmp/my_process_definition.xml")) + # + # # If you initialized your engine with + # # {:remote_definitions_allowed => true}, then you can also load an + # # XML process definition from a remote url + # require 'uri' + # LaunchItem.new(URI.new("http://foo.bar/my_process_definition.xml")) # def initialize (process_definition=nil) super()