Exit bot task when no data is returned from SQL plugin

Hi,

I have sql plugin that fetches data from db, at certain time there is no data returned by plugin. Is there a way to stop the task right there gracefully without going through the following steps.