Currently, our IT Automation feature does not support checking of one automation's result before triggering the second automation. We will take this up as a feature request and update this post once it's live.
However, the first two steps can be combined together using a single server script automation and can be associated with the apache process, for the process down attribute.
Please look at the above image for reference, in which whenever the NGINX process goes down it'll trigger Action Script1. This will execute the command to start the NGINX process and if the command fails, it will restart the corresponding server.
Please feel free to post your comments on this.