def launch(process_definition, fields={}, variables={}, root_stash=nil)

      #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

      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)

      #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

      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
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.