Re-run a flow based on the operation result

Hello everyone,

I am fairly new to HP OO. This week I have been developing a flow as part of an "Automation Week" at work. I am running a few queries against a database message hub so based on the data returned, I have a scriptlet that displays success or fail. My question here is how do I create an "else statement" within my flow to have it run again until a get a success result. Right now, I'm having the flow loop 5 times to gather the data.