Index: openacs-4/packages/workflow/tcl/action-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/action-procs.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/workflow/tcl/action-procs.xql 10 Jan 2003 13:38:37 -0000 1.1 +++ openacs-4/packages/workflow/tcl/action-procs.xql 14 Jan 2003 15:09:16 -0000 1.2 @@ -1,30 +1,78 @@ - + - insert into workflow_actions - (action_id, workflow_id, sort_order, short_name, - pretty_name, pretty_past_tense, assigned_role) - values (:action_id, :workflow_id, :sort_order, :short_name, - :pretty_name, :pretty_past_tense, :assigned_role) - - - - - insert into workflow_action_allowed_roles - (action_id, role_id) - values (:action_id, :allowed_role) + select :action_id, + (select role_id + from workflow_roles + where workflow_id = :workflow_id + and short_name = :allowed_role) as role_id - + insert into workflow_action_privileges (action_id, privilege) values (:action_id, :privilege) + + + select assigned_role + from workflow_actions + where action_id = :action_id + + + + + + select role_id + from workflow_action_allowed_roles + where action_id = :action_id + + + + + + select privilege + from workflow_action_privileges + where action_id = :action_id + + + + + + select action_id + from workflow_actions + where workflow_id = :workflow_id + and short_name = :short_name + + + + + + insert into workflow_actions + select :action_id, + :workflow_id, + :sort_order, + :short_name, + :pretty_name, + :pretty_past_tense, + :assigned_role_id, + :always_enabled_p + + + + + + select new_state + from workflow_fsm_actions a + where action_id = :action_id + + +