lib/ruote/receiver/base.rb in ruote-2.3.0.1 vs lib/ruote/receiver/base.rb in ruote-2.3.0.2

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2005-2012, John Mettraux, jmettraux@gmail.com +# Copyright (c) 2005-2013, John Mettraux, jmettraux@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -127,10 +127,22 @@ # 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) + 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),