Those functions are intended to run from within the body of a flow rather than a task. You could check the result of a task within the flow and have the flow decide to suspend based on the result. Also worth knowing is that with suspend, your flow is going to exit and then run again when it resumes. Putting as much as possible into cached task calls will help make the flow function reentrant. Anyway, if you’re still having trouble, share some code and we can check it out!