Index: openacs-4/packages/workflow/tcl/case-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/workflow/tcl/case-procs.xql 1 Sep 2003 13:43:51 -0000 1.8 +++ openacs-4/packages/workflow/tcl/case-procs.xql 18 Nov 2003 17:57:57 -0000 1.9 @@ -54,21 +54,11 @@ select a.action_id - from workflow_cases c, + from workflow_case_enabled_actions ena, workflow_actions a - where c.case_id = :case_id - and a.workflow_id = c.workflow_id - and not exists (select 1 - from workflow_initial_action wia - where wia.workflow_id = c.workflow_id - and wia.action_id = a.action_id) - and (a.always_enabled_p = 't' - or exists (select 1 - from workflow_case_fsm cfsm, - workflow_fsm_action_en_in_st waeis - where cfsm.case_id = c.case_id - and waeis.state_id = cfsm.current_state - and waeis.action_id = a.action_id)) + where ena.case_id = :case_id + and a.action_id = ena.action_id + and enabled_state = 'enabled' order by a.sort_order @@ -109,6 +99,20 @@ + + + + select a.action_id, + ena.enabled_action_id + from workflow_case_enabled_actions ena, + workflow_actions a + where ena.case_id = :case_id + and a.action_id = ena.action_id + and enabled_state = 'enabled' + order by a.sort_order + + + select impl.impl_name @@ -183,20 +187,14 @@ select 1 - from workflow_actions a - where a.action_id = :action_id - and (a.always_enabled_p = 't' or - exists (select 1 - from workflow_fsm_action_en_in_st waeis, - workflow_case_fsm c_fsm - where waeis.action_id = a.action_id - and c_fsm.case_id = :case_id - and waeis.state_id = c_fsm.current_state) - ) + from workflow_case_enabled_actions ean + where ean.action_id = :action_id + and ean.case_id = :case_id + and enabled_state = 'enabled' - + update workflow_case_fsm set current_state = :new_state_id @@ -211,7 +209,6 @@ where item_id = :entry_id - select distinct rum.user_id