Index: openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql 1 Sep 2003 13:43:51 -0000 1.11 +++ openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql 28 Sep 2003 01:24:27 -0000 1.12 @@ -528,3 +528,24 @@ 'entry_rev_id', -- id_column null -- name_method ); + +----------------- +-- Useful views +----------------- + +create or replace view workflow_case_assigned_actions as + select c.workflow_id, + c.case_id, + c.object_id, + a.action_id, + a.assigned_role as role_id + from workflow_cases c, + workflow_case_fsm cfsm, + workflow_actions a, + workflow_fsm_action_en_in_st aeis + where cfsm.case_id = c.case_id + and a.always_enabled_p = 'f' + and aeis.state_id = cfsm.current_state + and aeis.assigned_p = 't' + and a.action_id = aeis.action_id + and a.assigned_role is not null;