Workflow Selector using Cocoadialog

Script designed by Ian Gunther 2013
While working at University of Wisconsin Milwaukee

The goal of this script is to create an environment of easy to use, easy to follow choose-your-own adventure style selection process to arrive at the correct workflow/imaging process.
It is designed to be partially automated in that the script detects what it can from the machine it's imaging, and makes initial decisions on what should be done for the user before it arrives at
dialogue boxes for questions that must be answered to lead to the proper final workflow for the machine.
Ultimately this is designed with Desktop Support techs in mind so they can perform duties with minimal training on Macintosh units campus-wide.
This is intended to be run by itself as a workflow-selector workflow, and redirects to 12 different workflows in order to avoid the problem of nest depth restrictions.

For Reference the symbol below means 'yields' in notation
->

Process
1) Checks if the drive is encrypted, encryption -> error workflow
2) Checks if .applesetupdone exists, not true -> 2a; true -> 3
2a) Announces New Machine detection, offers to import data
3) Asks if user wants to rebuild the machine, yes -> 3a; no -> 4
3a) Asks if user wants to migrate data or just reimage, routes to auto detection of best version of OS for hardware
4) Asks if the machine is an old machine that requires data migration (backup) to a new machine, yes -> backup and wipe; no-> 5
5) Final dialog to cancel the workflow selector and start over