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 -r1.5 -r1.6 --- openacs-4/packages/workflow/tcl/action-procs.xql 3 Feb 2003 12:23:01 -0000 1.5 +++ openacs-4/packages/workflow/tcl/action-procs.xql 12 Feb 2003 14:23:14 -0000 1.6 @@ -56,41 +56,19 @@ - + - select assigned_role - from workflow_actions - where action_id = :action_id + select p.privilege, + p.action_id + from workflow_action_privileges p, + workflow_actions a + where a.action_id = p.action_id + and a.workflow_id = :workflow_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 - - - - - select a.action_id, a.workflow_id, a.sort_order, @@ -105,33 +83,71 @@ from workflow_initial_action where workflow_id = a.workflow_id and action_id = a.action_id - ) as initial_action_p - from workflow_actions a - where a.action_id = :action_id + ) as initial_action_p, + fa.new_state as new_state_id, + (select short_name from workflow_fsm_states where state_id = fa.new_state) as new_state + from workflow_actions a left outer join + workflow_fsm_actions fa on (a.action_id = fa.action_id) + where a.workflow_id = :workflow_id + and fa.action_id = a.action_id + order by a.sort_order - + - select impl.impl_owner_name || '.' || impl.impl_name - from acs_sc_impls impl, - workflow_action_callbacks c - where c.action_id = :action_id - and impl.impl_id = c.acs_sc_impl_id - order by c.sort_order + select workflow_id + from workflow_actions + where action_id = :action_id - + - select r.short_name + select impl.impl_id, + impl.impl_name, + impl.impl_owner_name, + ctr.contract_name, + a.action_id + from workflow_action_callbacks ac, + workflow_actions a, + acs_sc_impls impl, + acs_sc_bindings bind, + acs_sc_contracts ctr + where ac.action_id = a.action_id + and a.workflow_id = :workflow_id + and impl.impl_id = ac.acs_sc_impl_id + and impl.impl_id = bind.impl_id + and bind.contract_id = ctr.contract_id + order by a.action_id, ac.sort_order + + + + + + select r.short_name, + r.role_id, + aar.action_id from workflow_roles r, workflow_action_allowed_roles aar - where aar.action_id = :action_id + where r.workflow_id = :workflow_id and r.role_id = aar.role_id + + + select s.short_name, + waeis.action_id + from workflow_fsm_action_en_in_st waeis, + workflow_actions a, + workflow_fsm_states s + where waeis.action_id = a.action_id + and a.workflow_id = :workflow_id + and s.state_id = waeis.state_id + + + select coalesce(max(sort_order),0) + 1 @@ -147,8 +163,6 @@ - - insert into workflow_fsm_actions @@ -166,33 +180,4 @@ - - - select new_state - from workflow_fsm_actions a - where action_id = :action_id - - - - - - select a.new_state as new_state_id, - s.short_name as new_state - from workflow_fsm_actions a, - workflow_fsm_states s - where a.action_id = :action_id - and s.state_id = a.new_state - - - - - - select s.short_name - from workflow_fsm_action_en_in_st waeis, - workflow_fsm_states s - where waeis.action_id = :action_id - and s.state_id = waeis.state_id - - -