Sha256: 6ea6ded5e081203520a011c033bb3354c6a4bbbedd0b8ef4d89209f498279aa2
Contents?: true
Size: 618 Bytes
Versions: 24
Compression:
Stored size: 618 Bytes
Contents
module BusinessFlow # Fire ActiveSupport events for every step that's run and on errors class InstrumentedStepExecutor < InstrumentedExecutor protected def execute_step(step) i_name = event_name(step) i_payload = { flow: flow, step: step } ActiveSupport::Notifications.instrument(i_name, i_payload) do |payload| payload[:step_result] = super end notify_errors(i_name, i_payload) end def step_event_name(step) "#{flow_name}.#{step.to_s.underscore}" end def event_name(step) "business_flow.step.#{step_event_name(step)}" end end end
Version data entries
24 entries across 24 versions & 1 rubygems