New: In parameters you can set the maximum number of attempts