server/handlerwrappers/log.rb in cpee-1.3.183 vs server/handlerwrappers/log.rb in cpee-1.3.184

- old
+ new

@@ -10,11 +10,11 @@ # # You should have received a copy of the GNU General Public License along with # CPEE (file COPYING in the main directory). If not, see # <http://www.gnu.org/licenses/>. -class PromiseHandlerWrapper < WEEL::HandlerWrapperBase +class LogHandlerWrapper < WEEL::HandlerWrapperBase def initialize(arguments,endpoint=nil,position=nil,continue=nil) # {{{ @controller = arguments[0] @log_hash = {} @handler_continue = continue @handler_endpoint = endpoint @@ -31,11 +31,11 @@ end end end # }}} def activity_handle(passthrough, parameters) # {{{ - @controller.notify("activity/calling", :instance => @controller.instance, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters) + @controller.notify("activity/calling", :instance => @controller.instance, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :log_hash => @log_hash) instancenr=@controller.instance.split('/').last instance_dir = @controller.instance_variable_get(:@opts)[:instances] unless File.exist?(instance_dir+'/'+instancenr+'/log.xes') FileUtils.cp(instance_dir+'/template.xes', instance_dir+'/'+instancenr+'/log.xes') XML::Smart.modify(instance_dir+'/'+instancenr+'/log.xes') do |xml| @@ -108,10 +108,10 @@ def activity_no_longer_necessary # {{{ true end # }}} def inform_activity_done # {{{ - @controller.notify("activity/done", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position) + @controller.notify("activity/done", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position,:log_hash => @log_hash) p "log" p @log_hash time_added=false XML::Smart.modify(@controller.instance_variable_get(:@opts)[:instances]+'/'+@controller.instance.split('/').last+'/log.xes') do |xml| trace = xml.find("/xmlns:log/xmlns:trace").first