Decision Matrix

That is the direction you are being shown by the help here.

When something happens it changes the process. When you plan the process as process States that changes the view. Keep the do-something code lines to fit new structure and note that state progression doesn't have to be linear, may even repeat steps, or skip or jump especially when handling errors. Do handle all should not happen possibilities!