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