Index: openacs-4/packages/workflow/tcl/case-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs-oracle.xql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/workflow/tcl/case-procs-oracle.xql 1 Dec 2005 14:11:44 -0000 1.11 +++ openacs-4/packages/workflow/tcl/case-procs-oracle.xql 21 Nov 2017 13:05:13 -0000 1.12 @@ -2,44 +2,6 @@ oracle8.1.6 - - - select c.case_id, - c.workflow_id, - c.object_id, - s.state_id, - s.short_name as state_short_name, - s.pretty_name as pretty_state, - s.hide_fields as state_hide_fields - from workflow_cases c, - workflow_case_fsm cfsm, - workflow_fsm_states s - where c.case_id = :case_id - and cfsm.case_id = c.case_id - and cfsm.current_state = s.state_id (+) - and cfsm.parent_enabled_action_id = :parent_enabled_action_id - - - - - - select c.case_id, - c.workflow_id, - c.object_id, - s.state_id, - s.short_name as state_short_name, - s.pretty_name as pretty_state, - s.hide_fields as state_hide_fields - from workflow_cases c, - workflow_case_fsm cfsm, - workflow_fsm_states s - where c.case_id = :case_id - and cfsm.case_id = c.case_id - and cfsm.current_state = s.state_id (+) - and cfsm.parent_enabled_action_id is null - - - select m.party_id, @@ -53,50 +15,6 @@ - - - select l.entry_id, - l.case_id, - l.action_id, - a.short_name as action_short_name, - a.pretty_past_tense as action_pretty_past_tense, - io.creation_user, - iou.first_names as user_first_names, - iou.last_name as user_last_name, - iou.email as user_email, - io.creation_date, - to_char(io.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_pretty, - blob_to_string(r.content) as comment_string, -- needs il8-ing... - r.mime_type as comment_mime_type, - d.key, - d.value - from workflow_case_log l, - workflow_actions a, - cr_items i, - acs_objects io, - acs_users_all iou, - cr_revisions r, - workflow_case_log_data d - where l.case_id = :case_id - and l.action_id = a.action_id - and i.item_id = l.entry_id - and io.object_id = i.item_id - and iou.user_id (+) = io.creation_user - and r.revision_id = i.live_revision - and d.entry_id (+) = l.entry_id - order by creation_date - - - - - - select enabled_action_id - from workflow_case_enabled_actions - where execution_time <= sysdate - and completed_p = 'f' - - - select acs_object.name(:object_id) as name from dual @@ -149,36 +67,4 @@ - - - select q.* - from (select 1 - from workflow_case_enabled_actions ean - where ean.action_id = :action_id - and ean.case_id = :case_id - and completed_p = 'f' - ) q - where rownum = 1 - - - - - - select enabled_action_id, - case_id, - action_id, - assigned_p, - completed_p, - parent_enabled_action_id, - to_char(execution_time, 'YYYY-MM-DD HH24:MI:SS') as execution_time_ansi, - nvl((select a2.trigger_type - from workflow_case_enabled_actions e2, - workflow_actions a2 - where e2.enabled_action_id = e.parent_enabled_action_id - and a2.action_id = e2.action_id), 'workflow') as parent_trigger_type - from workflow_case_enabled_actions e - where enabled_action_id = :enabled_action_id - - - Index: openacs-4/packages/workflow/tcl/case-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs-postgresql.xql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/workflow/tcl/case-procs-postgresql.xql 17 Sep 2013 14:37:38 -0000 1.12 +++ openacs-4/packages/workflow/tcl/case-procs-postgresql.xql 21 Nov 2017 13:05:13 -0000 1.13 @@ -2,42 +2,6 @@ postgresql7.2 - - - select c.case_id, - c.workflow_id, - c.object_id, - s.state_id, - s.short_name as state_short_name, - s.pretty_name as pretty_state, - s.hide_fields as state_hide_fields - from workflow_cases c, - workflow_case_fsm cfsm left outer join - workflow_fsm_states s on (s.state_id = cfsm.current_state) - where c.case_id = :case_id - and cfsm.case_id = c.case_id - and cfsm.parent_enabled_action_id = :parent_enabled_action_id - - - - - - select c.case_id, - c.workflow_id, - c.object_id, - s.state_id, - s.short_name as state_short_name, - s.pretty_name as pretty_state, - s.hide_fields as state_hide_fields - from workflow_cases c, - workflow_case_fsm cfsm left outer join - workflow_fsm_states s on (s.state_id = cfsm.current_state) - where c.case_id = :case_id - and cfsm.case_id = c.case_id - and cfsm.parent_enabled_action_id is null - - - select m.party_id, @@ -51,44 +15,6 @@ - - - select l.entry_id, - l.case_id, - l.action_id, - a.short_name as action_short_name, - a.pretty_past_tense as action_pretty_past_tense, - io.creation_user, - iou.first_names as user_first_names, - iou.last_name as user_last_name, - iou.email as user_email, - io.creation_date, - to_char(io.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_pretty, - r.content as comment_string, - r.mime_type as comment_mime_type, - d.key, - d.value - from workflow_case_log l join - workflow_actions a using (action_id) join - cr_items i on (i.item_id = l.entry_id) join - acs_objects io on (io.object_id = i.item_id) left outer join - acs_users_all iou on (iou.user_id = io.creation_user) join - cr_revisions r on (r.revision_id = i.live_revision) left outer join - workflow_case_log_data d using (entry_id) - where l.case_id = :case_id - order by creation_date - - - - - - select enabled_action_id - from workflow_case_enabled_actions - where execution_time <= current_timestamp - and completed_p = 'f' - - - select acs_object__name(:object_id) as name @@ -139,34 +65,4 @@ - - - select 1 - from workflow_case_enabled_actions ean - where ean.action_id = :action_id - and ean.case_id = :case_id - and completed_p = 'f' - limit 1 - - - - - - select enabled_action_id, - case_id, - action_id, - assigned_p, - completed_p, - parent_enabled_action_id, - to_char(execution_time, 'YYYY-MM-DD HH24:MI:SS') as execution_time_ansi, - coalesce((select a2.trigger_type - from workflow_case_enabled_actions e2, - workflow_actions a2 - where e2.enabled_action_id = e.parent_enabled_action_id - and a2.action_id = e2.action_id), 'workflow') as parent_trigger_type - from workflow_case_enabled_actions e - where enabled_action_id = :enabled_action_id - - - 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.15 -r1.16 --- openacs-4/packages/workflow/tcl/case-procs.xql 17 Jun 2010 18:46:09 -0000 1.15 +++ openacs-4/packages/workflow/tcl/case-procs.xql 21 Nov 2017 13:05:13 -0000 1.16 @@ -100,7 +100,6 @@ - select ena.action_id, @@ -261,4 +260,107 @@ + + + select c.case_id, + c.workflow_id, + c.object_id, + s.state_id, + s.short_name as state_short_name, + s.pretty_name as pretty_state, + s.hide_fields as state_hide_fields + from workflow_cases c, + workflow_case_fsm cfsm left outer join + workflow_fsm_states s on (s.state_id = cfsm.current_state) + where c.case_id = :case_id + and cfsm.case_id = c.case_id + and cfsm.parent_enabled_action_id = :parent_enabled_action_id + + + + + + select c.case_id, + c.workflow_id, + c.object_id, + s.state_id, + s.short_name as state_short_name, + s.pretty_name as pretty_state, + s.hide_fields as state_hide_fields + from workflow_cases c, + workflow_case_fsm cfsm left outer join + workflow_fsm_states s on (s.state_id = cfsm.current_state) + where c.case_id = :case_id + and cfsm.case_id = c.case_id + and cfsm.parent_enabled_action_id is null + + + + + + select l.entry_id, + l.case_id, + l.action_id, + a.short_name as action_short_name, + a.pretty_past_tense as action_pretty_past_tense, + io.creation_user, + iou.first_names as user_first_names, + iou.last_name as user_last_name, + iou.email as user_email, + io.creation_date, + to_char(io.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_pretty, + r.content as comment_string, + r.mime_type as comment_mime_type, + d.key, + d.value + from workflow_case_log l join + workflow_actions a using (action_id) join + cr_items i on (i.item_id = l.entry_id) join + acs_objects io on (io.object_id = i.item_id) left outer join + acs_users_all iou on (iou.user_id = io.creation_user) join + cr_revisions r on (r.revision_id = i.live_revision) left outer join + workflow_case_log_data d using (entry_id) + where l.case_id = :case_id + order by creation_date + + + + + + select enabled_action_id + from workflow_case_enabled_actions + where execution_time <= current_timestamp + and completed_p = 'f' + + + + + + select 1 from dual where exists (select 1 + from workflow_case_enabled_actions ean + where ean.action_id = :action_id + and ean.case_id = :case_id + and completed_p = 'f') + + + + + + select enabled_action_id, + case_id, + action_id, + assigned_p, + completed_p, + parent_enabled_action_id, + to_char(execution_time, 'YYYY-MM-DD HH24:MI:SS') as execution_time_ansi, + coalesce((select a2.trigger_type + from workflow_case_enabled_actions e2, + workflow_actions a2 + where e2.enabled_action_id = e.parent_enabled_action_id + and a2.action_id = e2.action_id), 'workflow') as parent_trigger_type + from workflow_case_enabled_actions e + where enabled_action_id = :enabled_action_id + + + Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql 28 Aug 2003 09:41:53 -0000 1.3 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql 21 Nov 2017 13:14:58 -0000 1.4 @@ -1,31 +1,13 @@ - - oracle8.1.6 + oracle8.1.6 - - - select site_node.url(site_nodes.node_id) - from site_nodes - where site_nodes.object_id = :package_id - - + + + select site_node.url(site_nodes.node_id) + from site_nodes + where site_nodes.object_id = :package_id + + - - - select to_char(sysdate, :date_format) - from dual - - - - - - select bulk_mail_messages.* - from bulk_mail_messages - where bulk_mail_messages.status = 'pending' - and bulk_mail_messages.send_date <= sysdate - for update - - - Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql 24 Oct 2003 13:27:18 -0000 1.4 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql 21 Nov 2017 13:14:58 -0000 1.5 @@ -1,30 +1,13 @@ - - postgresql7.1 + postgresql7.1 + + + + select site_node__url(site_nodes.node_id) + from site_nodes + where site_nodes.object_id = :package_id + + - - - select site_node__url(site_nodes.node_id) - from site_nodes - where site_nodes.object_id = :package_id - - - - - - select to_char(current_timestamp, :date_format) - - - - - - select bulk_mail_messages.* - from bulk_mail_messages - where bulk_mail_messages.status = 'pending' - and bulk_mail_messages.send_date <= now() - for update - - - Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql 28 Aug 2003 09:41:53 -0000 1.2 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql 21 Nov 2017 13:14:58 -0000 1.3 @@ -17,4 +17,20 @@ + + + select to_char(current_timestamp, :date_format) from dual + + + + + + select bulk_mail_messages.* + from bulk_mail_messages + where bulk_mail_messages.status = 'pending' + and bulk_mail_messages.send_date <= current_timestamp + for update + + +