Index: openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/sample-expenses-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/sample-expenses-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/sample-expenses-create.sql	12 Apr 2001 18:28:31 -0000	1.2
+++ openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/sample-expenses-create.sql	13 Apr 2001 00:29:01 -0000	1.3
@@ -16,7 +16,7 @@
 			references wf_cases on delete cascade
 );
 
-create function inline_0 () returns int as '
+create function inline_0 () returns integer as '
 declare
     v_workflow_key varchar;
 begin
@@ -25,15 +25,15 @@
 	''Expense Authorization'', 
 	''Expense authorizations'', 
 	''Workflow for authorizing employee\\\'s expenses on the company\\\'s behalf'', 
-	''wf_expenses_cases''
+	''wf_expenses_cases'',
         ''case_id''
     );
 
     return null;
-end;' lanuage 'plpgsql'; 
+end;' language 'plpgsql'; 
 
 select inline_0 ();
-drop functon inline_0 ();
+drop function inline_0 ();
 
 insert into wf_places(place_key, workflow_key, place_name, sort_order) 
     values ('start', 'expenses_wf', 'Initial state', 1);
@@ -125,40 +125,60 @@
     values ('expenses_wf', 'buy', 'end', 'out');
 
 
-create functon inline_1 () returns integer as '
+create function inline_1 () returns integer as '
 declare
     v_attribute_id acs_attributes.attribute_id%TYPE;
 begin
     v_attribute_id := workflow__create_attribute(
-	workflow_key => 'expenses_wf',
-	attribute_name => 'supervisor_ok',
-	datatype => 'boolean',
-	pretty_name => 'Supervisor Approval',
-	default_value => 'f'
+	''expenses_wf'',
+	''supervisor_ok'',
+	''boolean'',
+	''Supervisor Approval'',
+        null,
+        null,
+        null,
+	''f'',
+        1,
+        1,
+        null,
+        ''generic'',
+        ''none''
     );
 
     insert into wf_transition_attribute_map
         (workflow_key, transition_key, attribute_id, sort_order) 
     values
-        ('expenses_wf', 'supervisor_approval', v_attribute_id, 1);
+        (''expenses_wf'', ''supervisor_approval'', v_attribute_id, 1);
 
     v_attribute_id := workflow__create_attribute(
-	workflow_key => 'expenses_wf',
-	attribute_name => 'other_ok',
-	datatype => 'boolean',
-	pretty_name => 'Other Approval',
-	default_value => 'f'
+	''expenses_wf'',
+	''other_ok'',
+	''boolean'',
+	''Other Approval'',
+        null,
+        null,
+        null,
+	''f'',
+        1,
+        1,
+        null,
+        ''generic'',
+        ''none''
     );
 
     insert into wf_transition_attribute_map
         (workflow_key, transition_key, attribute_id, sort_order) 
     values 
-        ('expenses_wf', 'other_approval', v_attribute_id, 1);
+        (''expenses_wf'', ''other_approval'', v_attribute_id, 1);
 
     return null;
 
 end;' language 'plpgsql';
 
+select inline_1 ();
+
+drop function inline_1 ();
+
 insert into wf_transition_assignment_map 
     (workflow_key, transition_key, assign_transition_key)
 values
@@ -231,7 +251,7 @@
 --is
 --
 --    function guard_both_approved_p (
---	case_id in number,
+--	case_id in integer,
 --	workflow_key in varchar2,
 --	transition_key in varchar2,
 --	place_key in varchar2,
@@ -246,17 +266,17 @@
 
 
 --create or replace package body wf_expenses
-create function function guard_both_approved_p (number,varchar,varchar,varchar,varchar,varchar) 
+create function guard_both_approved_p (integer,varchar,varchar,varchar,varchar,varchar) 
 returns boolean as '
 declare
-	case_id                 alias for $1;,
-	workflow_key            alias for $2;
-	transition_key          alias for $3;
-	place_key               alias for $4;
-	direction_in            alias for $5;
-	custom_arg              alias for $6;
-	v_other_ok_p            boolean;
-	v_supervisor_ok_p       boolean;
+	guard_both_approved_p__case_id                 alias for $1;
+	guard_both_approved_p__workflow_key            alias for $2;
+	guard_both_approved_p__transition_key          alias for $3;
+	guard_both_approved_p__place_key               alias for $4;
+	guard_both_approved_p__direction_in            alias for $5;
+	guard_both_approved_p__custom_arg              alias for $6;
+	v_other_ok_p                                   boolean;
+	v_supervisor_ok_p                              boolean;
 begin
 	v_other_ok_p := workflow_case__get_attribute_value(
 	    guard_both_approved_p__case_id,
