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 -N -r1.2 -r1.3
--- openacs-4/packages/workflow/tcl/case-procs.xql 20 Jan 2003 15:45:00 -0000 1.2
+++ openacs-4/packages/workflow/tcl/case-procs.xql 21 Jan 2003 18:06:00 -0000 1.3
@@ -53,24 +53,22 @@
- select distinct action_id
- from (select waeis.action_id
- from workflow_cases c,
- workflow_case_fsm cfsm,
- workflow_fsm_action_enabled_in_states waeis
- where c.case_id = :case_id
- and cfsm.case_id = c.case_id
- and waeis.state_id = cfsm.current_state
-
- union
-
- select a.action_id
- from workflow_cases c,
- workflow_actions a
- where c.case_id = :case_id
- and a.workflow_id = c.workflow_id
- and a.always_enabled_p = 't'
- ) enabled_actions
+ select a.action_id
+ from workflow_cases c,
+ 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_enabled_in_states waeis
+ where cfsm.case_id = c.case_id
+ and waeis.state_id = cfsm.current_state
+ and waeis.action_id = a.action_id))
@@ -83,10 +81,10 @@
-
+
select impl.impl_name
- from workflow_role_assignment_rules r,
+ from workflow_role_callbacks r,
acs_sc_impls impl,
acs_sc_bindings bind,
acs_sc_contracts ctr