Index: openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs.xql 25 Apr 2001 04:52:44 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs.xql 19 Nov 2001 18:25:09 -0000 1.2 @@ -1,60 +1,54 @@ - - + + - select tr.transition_key, - tr.transition_name, - tr.trigger_type, - '' as assignment_widget - from wf_transition_assignment_map tam, wf_transitions tr, wf_tasks t, wf_cases c - where t.task_id = :task_id - and c.case_id = t.case_id - and tam.workflow_key = c.workflow_key - and tam.transition_key = t.transition_key - and tr.workflow_key = tam.workflow_key - and tr.transition_key = tam.assign_transition_key - and tr.trigger_type = 'user' - order by tr.sort_order + select r.role_key, + r.role_name, + '' as assignment_widget + from wf_tasks t, wf_transition_role_assign_map tram, wf_roles r + where t.task_id = :task_id + and tram.workflow_key = t.workflow_key and tram.transition_key = t.transition_key + and r.workflow_key = tram.workflow_key and r.role_key = tram.assign_role_key + order by r.sort_order - + - select count(*) from wf_user_tasks where task_id = :task_id and user_id = :user_id - + select count(*) from wf_user_tasks where task_id = :task_id and user_id = :user_id + + - select a.attribute_name as name, - a.pretty_name, - a.datatype, - ai.wf_datatype, - v.attr_value as value - from wf_attribute_value_audit v, acs_attributes a, wf_attribute_info ai - where v.journal_id = :journal_id - and a.attribute_id = v.attribute_id - and ai.attribute_id = v.attribute_id - + select a.attribute_name as name, + a.pretty_name, + a.datatype, + v.attr_value as value + from wf_attribute_value_audit v, acs_attributes a + where v.journal_id = :journal_id + and a.attribute_id = v.attribute_id + - select t.pretty_name, - w.description - from wf_workflows w, acs_object_types t - where w.workflow_key = :workflow_key - and t.object_type = w.workflow_key + select t.pretty_name, + w.description + from wf_workflows w, acs_object_types t + where w.workflow_key = :workflow_key + and t.object_type = w.workflow_key @@ -63,11 +57,11 @@ - select transition_key, transition_name, sort_order - from wf_transitions - where workflow_key = :workflow_key - and trigger_type = 'user' - order by sort_order asc + select transition_key, transition_name, sort_order + from wf_transitions + where workflow_key = :workflow_key + and trigger_type = 'user' + order by sort_order asc @@ -76,38 +70,68 @@ - select a.attribute_name as name, - a.pretty_name, - a.datatype, - ai.wf_datatype, - v.attr_value as value - from wf_attribute_value_audit v, acs_attributes a, wf_attribute_info ai - where v.journal_id = :journal_id - and a.attribute_id = v.attribute_id - and ai.attribute_id = v.attribute_id - + select a.attribute_name as name, + a.pretty_name, + a.datatype, + v.attr_value as value + from wf_attribute_value_audit v, acs_attributes a + where v.journal_id = :journal_id + and a.attribute_id = v.attribute_id + + select case_id from wf_tasks where task_id = :task_id + + + + select place_key from wf_places where workflow_key = :workflow_key + + + + + select role_key from wf_roles where workflow_key = :workflow_key + + + + + + + select transition_key from wf_transitions where workflow_key = :workflow_key + + + + + + + + insert into wf_context_transition_info + (context_key, workflow_key, transition_key, estimated_minutes, instructions) + values (:context_key, :workflow_key, :transition_key, :estimated_minutes, :instructions) + + + + + - select wf.description, - ot.pretty_name, - ot.pretty_plural, - ot.table_name - from wf_workflows wf, - acs_object_types ot - where wf.workflow_key = :workflow_key - and ot.object_type = wf.workflow_key + select wf.description, + ot.pretty_name, + ot.pretty_plural, + ot.table_name + from wf_workflows wf, + acs_object_types ot + where wf.workflow_key = :workflow_key + and ot.object_type = wf.workflow_key @@ -119,9 +143,22 @@ select place_key, place_name, sort_order - from wf_places + from wf_places + where workflow_key = :workflow_key + order by sort_order asc + + + + + + + + + select role_key, + role_name, + sort_order + from wf_roles where workflow_key = :workflow_key - order by sort_order asc @@ -130,11 +167,11 @@ - select transition_key, transition_name, sort_order - from wf_transitions - where workflow_key = :workflow_key - and trigger_type = 'user' - order by sort_order asc + select transition_key, transition_name, sort_order + from wf_transitions + where workflow_key = :workflow_key + and trigger_type = 'user' + order by sort_order asc @@ -143,15 +180,15 @@ - select transition_key, - place_key, - direction, - guard_callback, - guard_custom_arg, - guard_description - from wf_arcs - where workflow_key = :workflow_key - order by transition_key asc + select transition_key, + place_key, + direction, + guard_callback, + guard_custom_arg, + guard_description + from wf_arcs + where workflow_key = :workflow_key + order by transition_key asc @@ -160,39 +197,39 @@ - select attribute_id, - attribute_name, - datatype, - pretty_name, - default_value - from acs_attributes - where object_type = :workflow_key - + select a.attribute_name as name, + a.pretty_name, + a.datatype, + v.attr_value as value + from wf_attribute_value_audit v, acs_attributes a + where v.journal_id = :journal_id + and a.attribute_id = v.attribute_id + - select transition_key, - sort_order - from wf_transition_attribute_map - where workflow_key = :workflow_key - and attribute_id = :attribute_id - + select transition_key, + sort_order + from wf_transition_attribute_map + where workflow_key = :workflow_key + and attribute_id = :attribute_id + - + - select transition_key, - assign_transition_key - from wf_transition_assignment_map - where workflow_key = :workflow_key - order by transition_key + select transition_key, + assign_role_key + from wf_transition_role_assign_map + where workflow_key = :workflow_key + order by transition_key @@ -201,25 +238,39 @@ - select transition_key, - estimated_minutes, - enable_callback, - enable_custom_arg, - fire_callback, - fire_custom_arg, + select transition_key, + estimated_minutes, + instructions, + enable_callback, + enable_custom_arg, + fire_callback, + fire_custom_arg, + time_callback, + time_custom_arg, + deadline_callback, + deadline_custom_arg, + deadline_attribute_name, + hold_timeout_callback, + hold_timeout_custom_arg, + notification_callback, + notification_custom_arg, + unassigned_callback, + unassigned_custom_arg + from wf_context_transition_info + where workflow_key = :workflow_key + and context_key = :context_key + + + + + + + + + select role_key, assignment_callback, - assignment_custom_arg, - time_callback, - time_custom_arg, - deadline_callback, - deadline_custom_arg, - deadline_attribute_name, - hold_timeout_callback, - hold_timeout_custom_arg, - notification_callback, - notification_custom_arg, - access_privilege - from wf_context_transition_info + assignment_custom_arg + from wf_context_role_info where workflow_key = :workflow_key and context_key = :context_key @@ -230,14 +281,16 @@ - select transition_key, - sort_key, - header, - template_url - from wf_context_task_panels - where context_key = :context_key - and workflow_key = :workflow_key - order by transition_key asc, sort_key asc + select transition_key, + sort_order, + header, + template_url, + overrides_action_p, + only_display_when_started_p + from wf_context_task_panels + where context_key = :context_key + and workflow_key = :workflow_key + order by transition_key asc, sort_order asc