transaction based event handling sample