Monitor - Windows: Restart Machine

Hi! All

I have created a workflow to restart a windows machine using the Windows: Restart Machine step. I have published the workflow on AE server.

Sometimes we have noticed that the Request is completed successfully. However, when we check later on, we find the server has not restarted.

Please suggest how we can ensure the workflow is completed successfully only once the server has restarted.

Hi!

You can redesign your workflow to check if the machine has restarted.

Below is a sample design. I have designed a parent process with three child workflows and a child process.

In the parent process I pass the parameters for host details, email credentials and the number of times to ping the machine to check if it has restarted. I also have the Simple Evaluation step to check if the number of times to ping has exceeded. I have added error handling for each child workflow as seen below.

  • The purpose of the first child workflow is to restart the machine using the Windows: Restart Machine ready Plugin step.

  • The purpose of the second child workflow is to generate a field count and set its value to the number of times to ping, increment count by 1 and set the count field as a global variable with the new count value.

  • The purpose of the third child workflow is to ping the machine and check the status. If ping is successful i.e., machine has restarted it sends an email to all stakeholders else it sets the status as Diverted.

In this way the workflow completes successful once it is a able to ping the machine I.e., it has restarted.

1 Like