Index: openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/workflow-case-package-body.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/workflow-case-package-body.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/workflow-case-package-body.sql 19 Nov 2001 18:17:46 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/workflow-case-package-body.sql 3 Jan 2002 00:58:44 -0000 1.2 @@ -1967,7 +1967,26 @@ ); end finish_task; + function get_task_id ( + case_id in wf_cases.case_id%TYPE, + transition_key in wf_transitions.transition_key%TYPE + ) return wf_tasks.task_id%TYPE + is + v_task_id number; + begin + select task_id into v_task_id + from wf_tasks + where case_id = get_task_id.case_id and + transition_key = get_task_id.transition_key; + + return v_task_id; + + exception when no_data_found then + raise_application_error(-20000, 'Case ' || case_id || 'has no transition with key ' || transition_key); + + end get_task_id; + end workflow_case; / show errors;