Honestly, the basic template is only a starting point. If you use it as is, it's fine for an automation that is simple and doesn't need to be robust, but if you need your automation to be robust, you should start from the Advanced process template instead. I assume you're using 'Process Template 1 - Basic'. See if you also have 'Process Template 2 - Advanced Scenarios'. In that template, the Start Up page actually calls another subpage called 'Control Applications'. Granted, in my opinion, even this Control Applications isn't as robust as it needs to be, but again it's just a starting point to work with. And it's much closer to production ready to begin with.
Here's a partial screenshot of the Control Applications page. It works on the basis of global data items that are used to identify what the next action should be for each application. Application A might need to be restarted whereas Application B can be left alone, and maybe Application C just needs to have the page refreshed so that its connection stays alive. I've used this before in automations that I wanted to be very robust, and I can say it works well when you want automations to run for hours (or days) and be able to handle restarting its own applications but also in the most efficient way rather than just kill and restart every time.
If you do use this, just note that you don't want to call the Start Up page throughout your logic. You just called that once at the beginning, but you can call the Control Applications page any time from anywhere. Probably best to think it through before doing that, but it works.
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company