onFailure method
Registers a failure handler for this chain.
If any step fails after exhausting retries, this handler will be invoked with information about the failure.
Implementation
TaskChain onFailure(String handlerName) {
failureName = handlerName;
return this;
}