Index: openacs-4/packages/simulation/www/simbuild/template-sim-type-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/template-sim-type-update.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/simbuild/template-sim-type-update.tcl 8 Jan 2004 10:50:34 -0000 1.1 +++ openacs-4/packages/simulation/www/simbuild/template-sim-type-update.tcl 30 Nov 2004 21:09:16 -0000 1.2 @@ -4,6 +4,18 @@ workflow_id:integer {sim_type "ready_template"} {return_url {[export_vars -base "template-edit" { workflow_id }]}} +} -validate { + inits_exist -requires {workflow_id:integer} { + if { [string match $sim_type "ready_template"] } { + if { ![simulation::template::check_init_p -workflow_id $workflow_id] } { + ad_complain "

Either the simulation template or one of its subworkflows + seems to be missing an initial action. Please correct this + before you try to mark this template ready for use.

+

Note that every subworkflow and parallel task must + also have its own initial action.

" + } + } + } } permission::require_write_permission -object_id $workflow_id @@ -14,4 +26,4 @@ -workflow_id $workflow_id \ -array row -ad_returnredirect $return_url +ad_returnredirect $return_url \ No newline at end of file