close method
Closes the workflow and it's FlowController.
The FlowController shouldn't be used after this function were called.
Implementation
Future<Response> close() async {
await responses.close();
depth = 0;
return lastResponse ?? const Response();
}