Scenario: A new server needs to be set up. Instead of setting up the server manually, use a workflow to automate as much of the set-up as possible. Part of this set-up involves installing a database and populating it with data. The installation of the database takes about fifteen minutes, so the workflow needs to wait for it to finish before trying to populate the data.
The Wait On External Event component in this screenshot is in charge of running the database installer and delaying the process until the database is installed. If the installation timesout, an email is sent to the server administrator.
The Wait on External Event component contains two embedded models: a start process and a wait process. The start process contains a component that launches the database installer. The wait process runs on a schedule to check if the installer has finished.
If the installation succeeds, the process moves into an embedded model that contains more steps for setting up the server, including populating the newly installed database with data. In the screenshot above, this model is called "More steps for setting up the server."
Inside the Start Process, an Execute Process (Run) component runs the installer file. The database application is sizeable, and the installation takes considerable time. While the installer is running, the Wait On External Event component waits and periodically checks to see if the installation is finished.
You can set how often the component checks the installation by changing the Time Between Checks property. You can also set when the component will stop checking by changing the Timeout Time Span property.
This process runs as often as the "Time Between Checks" property tells it to run. The File Exists component is set to look for a file that appears when the database has finished installing. When it finds this file, it knows the installation is complete.
Other components in this example are as follows: