lib/ruote/receiver/base.rb
# Given a process definitions and optional initial fields and variables,
# launches a new process instance.
#
# This method is mostly used from the Ruote::Dashboard class (which
# includes this mixin).
#
# process_definition must be a result of Ruote.process_definition call
# or XML or JSON serialized process definition, as accepted by
# Ruote::Reader#read.
#
# fields are workflow parameters that will be placed in workitem.fields.
#
# Calls to this method returns the newly launched "workflow instance id"
# ("wfid" for short), the [hopefully] unique identifier for the
# process instance.
#
# == custom :wfid
#
# When calling this method, it's OK to pass a field named :wfid (Symbol,
# not String) that will be used as the identifier for the process instance.
#
Given a process definitions and optional initial fields and variables,
launches a new process instance.

This method is mostly used from the Ruote::Dashboard class (which
includes this mixin).

process_definition must be a result of Ruote.process_definition call
or XML or JSON serialized process definition, as accepted by
Ruote::Reader#read.

fields are workflow parameters that will be placed in workitem.fields.

Calls to this method returns the newly launched "workflow instance id"
("wfid" for short), the [hopefully] unique identifier for the
process instance.

custom :wfid

When calling this method, it's OK to pass a field named :wfid (Symbol,
not String) that will be used as the identifier for the process instance.
Given a process definitions and optional initial fields and variables launches a new process instance . This method is mostly used from the Ruote :: Dashboard class ( which includes this mixin ) . process_definition must be a result of Ruote . process_definition call or XML or JSON serialized process definition as accepted by Ruote :: Reader#read . fields are workflow parameters that will be placed in workitem . fields . Calls to this method returns the newly launched " workflow instance id " ( " wfid " for short ) the [ hopefully ] unique identifier for the process instance . custom : wfid When calling this method it ' s OK to pass a field named : wfid ( Symbol not String ) that will be used as the identifier for the process instance .
def launch(process_definition, fields={}, variables={}, root_stash=nil)
         this is useful when noisy and running through a set of tests
      wfid = fields[:wfid] || @context.wfidgen.generate
      fields = Rufus::Json.dup(fields)
      variables = Rufus::Json.dup(variables)
      root_stash = Rufus::Json.dup(root_stash)
         making sure symbols are turned to strings
      @context.storage.put_msg(
        'launch',
        'wfid' => wfid,
        'tree' => @context.reader.read(process_definition),
        'workitem' => { 'fields' => fields },
        'variables' => variables,
        'stash' => root_stash)
      wfid
    end
def launch ( process_definition , fields = { } , variables = { } , root_stash = nil ) wfid = fields [ :wfid ] || @context . wfidgen . generate fields = Rufus :: Json . dup ( fields ) variables = Rufus :: Json . dup ( variables ) root_stash = Rufus :: Json . dup ( root_stash ) @context . storage . put_msg ( 'launch' , 'wfid' => wfid , 'tree' => @context . reader . read ( process_definition ) , 'workitem' => { 'fields' => fields } , 'variables' => variables , 'stash' => root_stash ) wfid end
Given a process definitions and optional initial fields and variables,
launches a new process instance.
Given a process definitions and optional initial fields and variables launches a new process instance .
#puts caller.select { |l| #  ! (l.match(/test\/unit[\.\/]/) or l.match(/\/rspec-core-/)) #} if @context.logger.noisy # # this is useful when noisy and running through a set of tests # # making sure symbols are turned to strings
process_definition
fields
variables
root_stash