Index: openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql 14 May 2001 23:16:08 -0000 1.5
+++ openacs-4/contrib/obsolete-packages/acs-workflow/tcl/workflow-procs-postgresql.xql 16 May 2001 00:40:41 -0000 1.6
@@ -289,6 +289,93 @@
+
+
+create function inline_0 () returns integer as '
+begin
+ PERFORM workflow__create_workflow(
+ ''[db_quote [db_quote $new_workflow_key]]'',
+ ''[db_quote [db_quote $new_workflow_pretty_name]]'',
+ ''[db_quote [db_quote $new_workflow_pretty_plural]]'',
+ ''[db_quote [db_quote $description]]'',
+ ''[db_quote [db_quote $new_table_name]]'',
+ ''case_id''
+ );
+
+ return null;
+
+end;' language 'plpgsql';
+
+select inline_0 ();
+drop function inline_0 ();
+
+
+
+
+
+
+
+create function inline_1 () returns integer as '
+declare
+ v_attribute_id acs_attributes.attribute_id%TYPE;
+begin
+
+
+
+
+
+
+
+ v_attribute_id := workflow__create_attribute(
+ ''[db_quote [db_quote $new_workflow_key]]'',
+ ''[db_quote [db_quote $attribute_name]]'',
+ ''[db_quote [db_quote $datatype]]'',
+ ''[db_quote [db_quote $pretty_name]]'',
+ null,
+ null,
+ null,
+ ''[db_quote [db_quote $default_value]]'',
+ 1,
+ 1,
+ null,
+ ''generic'',
+ ''none''
+ );
+
+
+
+
+
+
+
+ insert into wf_transition_attribute_map
+ (workflow_key,
+ transition_key,
+ attribute_id,
+ sort_order)
+ values
+ (''[db_quote [db_quote $new_workflow_key]]'',
+ ''[db_quote [db_quote $transition_key]]'',
+ v_attribute_id,
+ [ad_decode $sort_order "" "null" $sort_order]);
+
+
+
+
+
+
+
+
+ return null;
+
+end;' language 'plpgsql';
+
+select inline_1 ();
+
+drop function inline_1 ();
+
+
+