Tasks This describes the steps involved for the controller to perform its basic functions. NOTE: Many of the steps below will need to be logged as they occur. 1. Startup using the GUI A. The user invokes the main program. B. The main program instantiates the controller. C. The controller opens the Resource file (RCF). D. The controller reads the resource file. 1) The controller reads a Toolset entry: a) The controller instantiates the toolset meta-file, passing the constructor the RCF handle. The meta-file is an object that holds the portion of the resource file for a specific toolset. b) The meta-object reads the resource file, placing lines into its "line" array, until it reaches the next toolset or end of file. 2) The controller adds the toolset to its list. 3) The controller repeats 1 and 2 until it reaches EOF. E. The controller reads the User Override File (UOF) which contains user specified default values for tools by toolset. 1) The controller reads a preference line and parses a toolset stanza. 2) The controller passes the entry to the appropriate toolset meta-object. resource::read_prefs The meta object reads the UOF, replacing approporiate "lines" array elements and marking them as overridden, until it reaches the next toolset. 3) The controller repeats 1 and 2 until it reaches EOF. F. The controller instantiates the GUI passing it the list of toolsets. 1) The GUI displays itself to the user. 2. Selecting a proposal to process using the GUI A. The user selects the File/Open menu item. B. The GUI opens the PropOpen dialog, supplying the filter as "*.prop." C. The user enters/selects (via browse) the proposal to process, the output directory and the toolset to use. D. After the dialog closes, the GUI gets the filename, output directory and toolset from the dialog. file_dialog::get_info E. The GUI asks the controller to create a toolset instance for the new proposal, giving the controller the info supplied by the user. controller::open_proposal 1) The controller instantiates a proposal object for the proposal, if one doesn't already exist. 2) The controller duplicates the default toolset and links it to the proposal, if the toolset doesn't already exist for the toolset. toolset::duplicate tool::duplicate toolset::set_proposal 3) The controller opens the preference override file (POF) for the proposal. 4) The controller passes the file handle to the toolset, when it asks the toolset to load the overrides. toolset::read_prefs a) The toolset reads the POF. b) The toolset passes the overrides to the appropriate tools. tool::update_prefs F. The GUI creates a new tab panel for the proposal. 1) The GUI asks the controller for a list tools and they're status for the proposal. controller::get_tools 2) The GUI displays the tools. 3. Processing the proposal (Big Picture) A. The user presses the Process button. B. The GUI asks the controller to process the proposal with the current toolset. controller::process C. The controller looks up the toolset for the proposal in its list of active toolsets, then tells the toolset to process. toolset::process D. The toolset sends status info, suitable for a thermometer, back to the controller during its run. controller::relay_status E. The controller adds the proposal and toolset id to the status info and sends this data to the GUI. gui::update_status F. The GUI updates the thermometer in the tab panel that corresponds to the proposal and toolset. 4. Toolset Processes a proposal A. The toolset is asked to process a particular proposal. Steps B through F are repeated for each tool that is enabled. B. Toolset checks the prerequisites for each tool. tool::check_prereq 1) Query each tool about required processing by other tools tool::check_run_status a) Check with controller that each has run 2) Query each tool about required files tool::check_file_status a) Check that each file exists in the input directory 3) Query each tool about other conditions tool::check_other_status a) Run or evaluate tool specific code for these conditions C. If all prerequisites are met, Tool is run. tool::run 1) If it is an OrbixWeb CORBA interface, tool will automatically start up on the local machine if possible. 2) If it is a LISP, ILU CORBA interface, call a startup routine to start the tool. 3) Get arguments from the proposal and preferences. prop::get_args pref::get_args D. Tool starts running on the necessary data. 1) Some files may need to be transferred to the server or fed through the controller?????? E. Tool sends status to the GUI toolset::relay_status F. When tool finishes it reports to the toolset: toolset::relay_status toolset::handle_end 1) Successful or unsuccessful completion 2) Health & safety errors and system errors G. Toolset reports completion results to controller. controller::handle_end H. Controller records completion status and reports to GUI. gui::update_status I. GUI updates to reflect processing success or failure. 5. Setting Tool Preferences A. The user selects the Configure/Tools menu item. B. The GUI presents the Configure Tools dialog. controller::get_tools 1) If there isn't already a proposal selected, make the user choose a toolset. The preferrence settings will be applied as user settings. 2) The dialog asks the controller for a list of tools for the current toolset and places them in a dropdown list. C. The user selects a tool. D. The GUI presents a list of attributes for the tool. controller::get_tool_prefs 1) The dialog asks the controller for a list of preferrences and their current values for the selected toolset and places them in a list. E. The user selects a tool. F. The GUI displays the possible values for the tool. controller::get_tool_pref_edits 1) The dialog asks the controller for the possible values of the selected preferrence. G. The user changes the value. H. The user presses one of the following buttons: OK - applies changes to the current proposal controller::set_tool_pref_value 1) The GUI asks the controller to update the value Save - does OK and saves to the POF file controller::write_prop_override 1) The GUI asks the controller to save the preferrences to the POF file Make Default - does OK and saves to the UOF file controller::write_user_prefs 1) The GUI asks the controller to save the preferrences to the UPF file Close - the dialog closes 6. Enabling/disabling a tool (a toggle) A. The user presses the checkbox next to the tool to enable/disable. controller::toggle_tool_stat B. The GUI asks the controller to disable the tool. 1) The controller finds the toolset from its list. toolset::toggle_tool_state 2) The controller sends the update request to the toolset. tool::toggle_tool_state a) The toolset tells the tool to toggle its state value. 8. Processing errors