Add support for event transaction

All events are dispatched after method invocation if the api is called via 'execute' or 'execute_batch' method.