How to make a workflow self healing