Index: openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simbuild/Attic/template-edit.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl 12 Jan 2004 11:33:41 -0000 1.21 +++ openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl 29 Jan 2004 14:36:39 -0000 1.22 @@ -125,6 +125,13 @@ } -edit_data { if { [template::util::is_true $template_ready_p] } { + + # A workflow needs to have states to be ready + if { [llength [workflow::state::fsm::get_ids -all -workflow_id $workflow_id]] == 0 } { + template::form::set_error sim_template template_ready_p "Cannot mark template ready for use as it has no states" + break + } + set row(sim_type) "ready_template" } else { set row(sim_type) "dev_template"