DBA Data[Home] [Help]

PACKAGE: APPS.WF_ENGINE

Source


1 package WF_ENGINE as
2 /* $Header: wfengs.pls 120.6.12010000.1 2008/07/25 14:41:33 appldev ship $ */
3 /*#
4  * Provides APIs that can be called by an application program
5  * or a workflow function in the runtime phase to communicate
6  * with the Workflow Engine and to change the status of
7  * workflow process activities.
8  * @rep:scope public
9  * @rep:product OWF
10  * @rep:displayname Workflow Engine
11  * @rep:lifecycle active
12  * @rep:compatibility S
13  * @rep:category BUSINESS_ENTITY WF_ENGINE
14  * @rep:ihelp FND/@eng_api See the related online help
15  */
16 --
17 -- Constant values
18 --
19 threshold number := 50;    -- Cost over which to defer activities
20 debug boolean := FALSE;    -- Run engine in debug or normal mode
21 
22 -- Standard date format string.  Used to convert dates to strings
23 -- when returning date values as activity function results.
24 date_format varchar2(30) := 'YYYY/MM/DD HH24:MI:SS';
25 
26 -- Set_Context context
27 --   Process for which set_context function has been called
28 setctx_itemtype varchar2(8) := '';  -- Current itemtype
29 setctx_itemkey varchar2(240) := ''; -- Current itemkey
30 
31 -- Post-Notification Function Context areas
32 --   Used to pass information to callback functions
33 context_nid number := '';          -- Notification id (if applicable)
34 context_text varchar2(2000) := ''; -- Text information
35 
36 -- Bug 3065814
37 -- Global context variables for post-notification
38 context_user  varchar2(320);
39 context_user_comment VARCHAR2(4000);
40 context_recipient_role varchar2(320);
41 context_original_recipient varchar2(320);
42 context_from_role varchar2(320);
43 context_new_role   varchar2(320);
44 context_more_info_role  varchar2(320);
45 context_user_key varchar2(240);
46 context_proxy varchar2(320);
47 
48 -- Bug 2156047
49 -- Global variables to store Notification id and
50 -- text information for Post Notification Function
51 g_nid number;          -- current notification id
52 g_text varchar2(2000); -- text information
53 
54 -- Activity types
55 eng_process         varchar2(8) := 'PROCESS';  -- Process type activity
56 eng_function        varchar2(8) := 'FUNCTION'; -- Function type activity
57 eng_notification    varchar2(8) := 'NOTICE';   -- Notification type activity
58 -- eng_event           varchar2(8) := 'EVENT';    -- Event activity
59 
60 -- Item activity statuses
61 eng_completed       varchar2(8) := 'COMPLETE'; -- Normal completion
62 eng_active          varchar2(8) := 'ACTIVE';   -- Activity running
63 eng_waiting         varchar2(8) := 'WAITING';  -- Activity waiting to run
64 eng_notified        varchar2(8) := 'NOTIFIED'; -- Notification open
65 eng_suspended       varchar2(8) := 'SUSPEND';  -- Activity suspended
66 eng_deferred        varchar2(8) := 'DEFERRED'; -- Activity deferred
67 eng_error           varchar2(8) := 'ERROR';    -- Completed with error
68 
69 -- Standard activity result codes
70 eng_exception       varchar2(30) := '#EXCEPTION'; -- Unhandled exception
71 eng_timedout        varchar2(30) := '#TIMEOUT';   -- Activity timed out
72 eng_stuck           varchar2(30) := '#STUCK';     -- Stuck process
73 eng_force           varchar2(30) := '#FORCE';     -- Forced completion
74 eng_noresult        varchar2(30) := '#NORESULT';  -- No result for activity
75 eng_mail            varchar2(30) := '#MAIL';      -- Notification mail error
76 eng_null            varchar2(30) := '#NULL';      -- Noop result
77 eng_nomatch         varchar2(30) := '#NOMATCH';   -- Voting no winner
78 eng_tie             varchar2(30) := '#TIE';       -- Voting tie
79 eng_noskip          varchar2(30) := '#NOSKIP';    -- Skip not allowed
80 
81 -- Activity loop reset values
82 eng_reset           varchar2(8) := 'RESET';  -- Loop with cancelling
83 eng_ignore          varchar2(8) := 'IGNORE'; -- Do not reset activity
84 eng_loop            varchar2(8) := 'LOOP';   -- Loop without cancelling
85 
86 -- Start/end activity flags
87 eng_start           varchar2(8) := 'START'; -- Start activity
88 eng_end             varchar2(8) := 'END';   -- End activity
89 
90 -- Function activity modes
91 eng_run             varchar2(8) := 'RUN';      -- Run mode
92 eng_cancel          varchar2(8) := 'CANCEL';   -- Cancel mode
93 eng_timeout         varchar2(8) := 'TIMEOUT';  -- Timeout mode
94 eng_setctx          varchar2(8) := 'SET_CTX';  -- Selector set context mode
95 eng_testctx         varchar2(8) := 'TEST_CTX'; -- Selector test context mode
96 
97 -- HandleError command modes
98 eng_retry           varchar2(8) := 'RETRY'; -- Retry errored activity
99 eng_skip            varchar2(8) := 'SKIP';  -- Skip errored activity
100 
101 eng_wferror         varchar2(8) := 'WFERROR'; -- Error process itemtype
102 
103 -- Monitor access key names
104 wfmon_mon_key       varchar2(30) := '.MONITOR_KEY'; -- Read-only monitor key
105 wfmon_acc_key       varchar2(30) := '.ADMIN_KEY';  -- Admin monitor key
106 
107 -- Schema attribute name
108 eng_schema          varchar2(320) := '#SCHEMA';  -- current schema name
109 
110 -- Special activity attribute names
111 eng_priority         varchar2(30) := '#PRIORITY'; -- Priority override
112 eng_timeout_attr     varchar2(30) := '#TIMEOUT'; -- Priority override
113 
114 -- Standard activity transitions
115 eng_trans_default    varchar2(30) := '*';
116 eng_trans_any        varchar2(30) := '#ANY';
117 
118 -- commit for every n iterations
119 commit_frequency     number       := 500;
120 
121 /**** #### Defined below *****/
122 
123 -- Applications context flag
124 -- By default we want context to be preserved.
125 preserved_context    boolean      := TRUE;
126 
127  -- Execution Counter
128  --
129     ExecCounter number := 0;
130 
131 --
132 -- Synch mode
133 --   NOTE: Synch mode is only to be used for in-line processes that are
134 --   run to completion and purged within one session.  Some process data
135 --   is never saved to the database, so the monitor, reports, any external
136 --   access to workflow tables, etc, will not work.
137 --
138 --   This mode is enabled by setting the user_key of the item to
139 --   wf_engine.eng_synch.
140 --
141 --   *** Do NOT enable this mode unless you are sure you understand
142 --   *** the implications!
143 --
144 synch_mode boolean := FALSE; -- *** OBSOLETE! DO NOT USE! ***
145 
146 eng_synch varchar2(8) := '#SYNCH';
147 
148 -- 16-DEC-03 shanjgik bug fix 2722369 Reassign modes added
149 eng_reassign varchar2(8) := 'REASSIGN';-- not exactly a mode, added just for completeness
150 eng_delegate varchar2(8) := 'DELEGATE';
151 eng_transfer varchar2(8) := 'TRANSFER';
152 
153 type AttrRecTyp is record (
154   name varchar2(30),
155   text_value varchar2(4000),
156   number_value number,
157   date_value date);
158 type AttrArrayTyp is table of AttrRecTyp
159 index by binary_integer;
160 
161 synch_attr_arr AttrArrayTyp;       -- Array of item attributes
162 synch_attr_count pls_integer := 0; -- Array size
163 
164 type NameTabTyp is table of Wf_Item_Attribute_Values.NAME%TYPE
165   index by binary_integer;
166 type TextTabTyp is table of Wf_Item_Attribute_Values.TEXT_VALUE%TYPE
167   index by binary_integer;
168 type NumTabTyp is table of Wf_Item_Attribute_Values.NUMBER_VALUE%TYPE
169   index by binary_integer;
170 type DateTabTyp is table of Wf_Item_Attribute_Values.DATE_VALUE%TYPE
171   index by binary_integer;
172 
173 
174 --
175 -- AddItemAttr (PUBLIC)
176 --   Add a new unvalidated run-time item attribute.
177 -- IN:
178 --   itemtype - item type
179 --   itemkey - item key
180 --   aname - attribute name
181 --   text_value   - add text value to it if provided.
182 --   number_value - add number value to it if provided.
183 --   date_value   - add date value to it if provided.
184 -- NOTE:
185 --   The new attribute has no type associated.  Get/set usages of the
186 --   attribute must insure type consistency.
187 --
188 /*#
189  * Adds a new item type attribute variable to the process. Although most item
190  * type attributes are defined at design time, you can create new attributes at
191  * runtime for a specific process. You can optionally set a default text,
192  * number, or date value for a new item type attribute when the attribute is
193  * created.
194  * @param itemtype Item Type
195  * @param itemkey Item Key
196  * @param aname Attribute Name
197  * @param text_value Text Attribute Value
198  * @param number_value Number Attribute Value
199  * @param date_value Date Attribute Value
200  * @rep:scope public
201  * @rep:lifecycle active
202  * @rep:displayname Add Item Attribute
203  * @rep:compatibility S
204  * @rep:ihelp FND/@eng_api#a_addp See the related online help
205  */
206 procedure AddItemAttr(itemtype in varchar2,
207                       itemkey in varchar2,
208                       aname in varchar2,
209                       text_value   in varchar2 default null,
210                       number_value in number   default null,
211                       date_value   in date     default null);
212 
213 --
214 -- AddItemAttrTextArray (PUBLIC)
215 --   Add an array of new unvalidated run-time item attributes of type text.
216 -- IN:
217 --   itemtype - item type
218 --   itemkey - item key
219 --   aname - Array of Names
220 --   avalue - Array of New values for attribute
221 -- NOTE:
222 --   The new attributes have no type associated.  Get/set usages of these
223 --   attributes must insure type consistency.
224 --
225 /*#
226  * Adds an array of new text item type attributes to the process. Although
227  * most item type attributes are defined at design time, you can create new
228  * attributes at runtime for a specific process. Use this API rather than the
229  * AddItemAttr API for improved performance when you need to add large numbers
230  * of text item type attributes at once.
231  * @param itemtype Item Type
232  * @param itemkey Item Key
233  * @param aname Attribute Name Array
234  * @param avalue Attribute Value Array
235  * @rep:scope public
236  * @rep:lifecycle active
237  * @rep:displayname Add Text Item Attribute Value Array
238  * @rep:compatibility S
239  * @rep:ihelp FND/@eng_api#a_aiaa See the related online help
240  */
241 procedure AddItemAttrTextArray(
242   itemtype in varchar2,
243   itemkey  in varchar2,
244   aname    in Wf_Engine.NameTabTyp,
245   avalue   in Wf_Engine.TextTabTyp);
246 
247 --
248 -- AddItemAttrNumberArray (PUBLIC)
249 --   Add an array of new unvalidated run-time item attributes of type number.
250 -- IN:
251 --   itemtype - item type
252 --   itemkey - item key
253 --   aname - Array of Names
254 --   avalue - Array of New values for attribute
255 -- NOTE:
256 --   The new attributes have no type associated.  Get/set usages of these
257 --   attributes must insure type consistency.
258 --
259 /*#
260  * Adds an array of new number item type attributes to the process. Although
261  * most item type attributes are defined at design time, you can create new
262  * attributes at runtime for a specific process. Use this API rather than the
263  * AddItemAttr API for improved performance when you need to add large numbers
264  * of number item type attributes at once.
265  * @param itemtype Item Type
266  * @param itemkey Item Key
267  * @param aname Attribute Name Array
268  * @param avalue Attribute Value Array
269  * @rep:scope public
270  * @rep:lifecycle active
271  * @rep:displayname Add Number Item Attribute Value Array
272  * @rep:compatibility S
273  * @rep:ihelp FND/@eng_api#a_aiaa See the related online help
274  */
275 procedure AddItemAttrNumberArray(
276   itemtype in varchar2,
277   itemkey  in varchar2,
278   aname    in Wf_Engine.NameTabTyp,
279   avalue   in Wf_Engine.NumTabTyp);
280 
281 --
282 -- AddItemAttrDateArray (PUBLIC)
283 --   Add an array of new unvalidated run-time item attributes of type date.
284 -- IN:
285 --   itemtype - item type
286 --   itemkey - item key
287 --   aname - Array of Names
288 --   avalue - Array of New values for attribute
289 -- NOTE:
290 --   The new attributes have no type associated.  Get/set usages of these
291 --   attributes must insure type consistency.
292 --
293 /*#
294  * Adds an array of new date item type attributes to the process. Although
295  * most item type attributes are defined at design time, you can create new
296  * attributes at runtime for a specific process. Use this API rather than the
297  * AddItemAttr API for improved performance when you need to add large numbers
298  * of date item type attributes at once.
299  * @param itemtype Item Type
300  * @param itemkey Item Key
301  * @param aname Attribute Name Array
302  * @param avalue Attribute Value Array
303  * @rep:scope public
304  * @rep:lifecycle active
305  * @rep:displayname Add Date Item Attribute Value Array
306  * @rep:compatibility S
307  * @rep:ihelp FND/@eng_api#a_aiaa See the related online help
308  */
309 procedure AddItemAttrDateArray(
310   itemtype in varchar2,
311   itemkey  in varchar2,
312   aname    in Wf_Engine.NameTabTyp,
313   avalue   in Wf_Engine.DateTabTyp);
314 
315 --
316 -- SetItemAttrText (PUBLIC)
317 --   Set the value of a text item attribute.
318 --   If the attribute is a NUMBER or DATE type, then translate the
319 --   text-string value to a number/date using attribute format.
320 --   For all other types, store the value directly.
321 -- IN:
322 --   itemtype - Item type
323 --   itemkey - Item key
327 /*#
324 --   aname - Attribute Name
325 --   avalue - New value for attribute
326 --
328  * Sets the value of a text item type attribute in a process. You can
329  * also use this API for attributes of type role, form, URL, lookup, or
330  * document.
331  * @param itemtype Item Type
332  * @param itemkey Item Key
333  * @param aname Attribute Name
334  * @param avalue Attribute Value
335  * @rep:scope public
336  * @rep:lifecycle active
337  * @rep:displayname Set Text Item Attribute Value
338  * @rep:compatibility S
339  * @rep:ihelp FND/@eng_api#a_setp See the related online help
340  */
341 procedure SetItemAttrText(itemtype in varchar2,
342                           itemkey in varchar2,
343                           aname in varchar2,
344                           avalue in varchar2);
345 
346 --
347 -- SetItemAttrText2 (PRIVATE)
348 --   Set the value of a text item attribute.
349 --   If the attribute is a NUMBER or DATE type, then translate the
350 --   text-string value to a number/date using attribute format.
351 --   For all other types, store the value directly.
352 -- IN:
353 --   p_itemtype - Item type
354 --   p_itemkey - Item key
355 --   p_aname - Attribute Name
356 --   p_avalue - New value for attribute
357 -- RETURNS:
358 --   boolean
359 --
360 function SetItemAttrText2(p_itemtype in varchar2,
361                           p_itemkey in varchar2,
362                           p_aname in varchar2,
363                           p_avalue in varchar2) return boolean;
364 
365 --
366 -- SetItemAttrNumber (PUBLIC)
367 --   Set the value of a number item attribute.
368 --   Attribute must be a NUMBER-type attribute.
369 -- IN:
370 --   itemtype - Item type
371 --   itemkey - Item key
372 --   aname - Attribute Name
373 --   avalue - New value for attribute
374 --
375 /*#
376  * Sets the value of a number item type attribute in a process.
377  * @param itemtype Item Type
378  * @param itemkey Item Key
379  * @param aname Attribute Name
380  * @param avalue Attribute Value
381  * @rep:scope public
382  * @rep:lifecycle active
383  * @rep:displayname Set Number Item Attribute Value
384  * @rep:compatibility S
385  * @rep:ihelp FND/@eng_api#a_setp See the related online help
386  */
387 procedure SetItemAttrNumber(itemtype in varchar2,
388                             itemkey in varchar2,
389                             aname in varchar2,
390                             avalue in number);
391 
392 --
393 -- SetItemAttrDate (PUBLIC)
394 --   Set the value of a date item attribute.
395 --   Attribute must be a DATE-type attribute.
396 -- IN:
397 --   itemtype - Item type
398 --   itemkey - Item key
399 --   aname - Attribute Name
400 --   avalue - New value for attribute
401 --
402 /*#
403  * Sets the value of a date item type attribute in a process.
404  * @param itemtype Item Type
405  * @param itemkey Item Key
406  * @param aname Attribute Name
407  * @param avalue Attribute Value
408  * @rep:scope public
409  * @rep:lifecycle active
410  * @rep:displayname Set Date Item Attribute Value
411  * @rep:compatibility S
412  * @rep:ihelp FND/@eng_api#a_setp See the related online help
413  */
414 procedure SetItemAttrDate(itemtype in varchar2,
415                           itemkey in varchar2,
416                           aname in varchar2,
417                           avalue in date);
418 
419 --
420 -- SetItemAttrDocument (PUBLIC)
421 --   Set the value of a document item attribute.
422 -- IN:
423 --   itemtype - Item type
424 --   itemkey - Item key
425 --   aname - Attribute Name
426 --   documentid - Document Identifier - full concatenated document attribute
427 --                strings:
428 --                nodeid:libraryid:documentid:version:document_name
429 --
430 /*#
431  * Sets the value of an item attribute of type document, to a document
432  * identifier.
433  * @param itemtype Item Type
434  * @param itemkey Item Key
435  * @param aname Attribute Name
436  * @param documentid Document ID
437  * @rep:scope public
438  * @rep:lifecycle active
439  * @rep:displayname Set Document Item Attribute Value
440  * @rep:compatibility S
441  * @rep:ihelp FND/@eng_api#a_siad See the related online help
442  */
443 procedure SetItemAttrDocument(itemtype in varchar2,
444                               itemkey in varchar2,
445                               aname in varchar2,
446                               documentid in varchar2);
447 
448 --
449 -- SetItemAttrTextArray (PUBLIC)
450 --   Set the values of an array of text item attribute.
451 --   Unlike SetItemAttrText(), it stores the values directly.
452 -- IN:
453 --   itemtype - Item type
454 --   itemkey - Item key
455 --   aname - Array of Names
456 --   avalue - Array of New values for attribute
457 --
458 /*#
459  * Sets the values of an array of item type attributes in a process. Use the
460  * SetItemAttrTextArray API rather than the SetItemAttrText API for improved
461  * performance when you need to set the values of large numbers of item type
462  * attributes at once.
463  * @param itemtype Item Type
464  * @param itemkey Item Key
465  * @param aname Attribute Name Array
466  * @param avalue Attribute Value Array
467  * @rep:scope public
471  * @rep:ihelp FND/@eng_api#a_siaa See the related online help
468  * @rep:lifecycle active
469  * @rep:displayname Set Item Attribute Text Array
470  * @rep:compatibility S
472  */
473 procedure SetItemAttrTextArray(
474   itemtype in varchar2,
475   itemkey  in varchar2,
476   aname    in Wf_Engine.NameTabTyp,
477   avalue   in Wf_Engine.TextTabTyp);
478 
479 --
480 -- SetItemAttrNumberArray (PUBLIC)
481 --   Set the value of an array of number item attribute.
482 --   Attribute must be a NUMBER-type attribute.
483 -- IN:
484 --   itemtype - Item type
485 --   itemkey - Item key
486 --   aname - Array of Names
487 --   avalue - Array of new value for attribute
488 --
489 /*#
490  * Sets the values of an array of item type attributes in a process. Use the
491  * SetItemAttrNumberArray API rather than the SetItemAttrNumber API for improved
492  * performance when you need to set the values of large numbers of item type
493  * attributes at once.
494  * @param itemtype Item Type
495  * @param itemkey Item Key
496  * @param aname Attribute Name Array
497  * @param avalue Attribute Value Array
498  * @rep:scope public
499  * @rep:lifecycle active
500  * @rep:displayname Set Item Attribute Number Array
501  * @rep:compatibility S
502  * @rep:ihelp FND/@eng_api#a_siaa See the related online help
503  */
504 procedure SetItemAttrNumberArray(
505   itemtype in varchar2,
506   itemkey  in varchar2,
507   aname    in Wf_Engine.NameTabTyp,
508   avalue   in Wf_Engine.NumTabTyp);
509 
510 --
511 -- SetItemAttrDateArray (PUBLIC)
512 --   Set the value of an array of date item attribute.
513 --   Attribute must be a DATE-type attribute.
514 -- IN:
515 --   itemtype - Item type
516 --   itemkey - Item key
517 --   aname - Array of Name
518 --   avalue - Array of new value for attribute
519 --
520 /*#
521  * Sets the values of an array of item type attributes in a process. Use the
522  * SetItemAttrDateArray API rather than the SetItemAttrDate API for improved
523  * performance when you need to set the values of large numbers of item type
524  * attributes at once.
525  * @param itemtype Item Type
526  * @param itemkey Item Key
527  * @param aname Attribute Name Array
528  * @param avalue Attribute Value Array
529  * @rep:scope public
530  * @rep:lifecycle active
531  * @rep:displayname Set Item Attribute Date Array
532  * @rep:compatibility S
533  * @rep:ihelp FND/@eng_api#a_siaa See the related online help
534  */
535 procedure SetItemAttrDateArray(
536   itemtype in varchar2,
537   itemkey  in varchar2,
538   aname    in Wf_Engine.NameTabTyp,
539   avalue   in Wf_Engine.DateTabTyp);
540 
541 --
542 -- Getitemattrinfo (PUBLIC)
543 --   Get type information about a item attribute.
544 -- IN:
545 --   itemtype - Item type
546 --   aname - Attribute name
547 -- OUT:
548 --   atype  - Attribute type
549 --   subtype - 'SEND' or 'RESPOND'
550 --   format - Attribute format
551 --
552 /*#
553  * Returns information about an item type attribute, such as its type and format,
554  * if any is specified. Currently, subtype information is not available for item
555  * type attributes
556  * @param itemtype Item Type
557  * @param aname Attribute Name
558  * @param atype Attribute Type
559  * @param subtype Attribute Subtype
560  * @param format Attribute Format
561  * @rep:scope public
562  * @rep:lifecycle active
563  * @rep:displayname Get Item Attribute Information
564  * @rep:compatibility S
565  * @rep:ihelp FND/@eng_api#a_getiainfo See the related online help
566  */
567 procedure GetItemAttrInfo(itemtype in varchar2,
568                           aname in varchar2,
569                           atype out NOCOPY varchar2,
570                           subtype out NOCOPY varchar2,
571                           format out NOCOPY varchar2);
572 
573 --
574 -- GetItemAttrText (PUBLIC)
575 --   Get the value of a text item attribute.
576 --   If the attribute is a NUMBER or DATE type, then translate the
577 --   number/date value to a text-string representation using attrbute format.
578 --   For all other types, get the value directly.
579 -- IN:
580 --   itemtype - Item type
581 --   itemkey - Item key
582 --   aname - Attribute Name
583 -- RETURNS:
584 --   Attribute value
585 --
586 /*#
587  * Returns the value of a text item type attribute in a process. You can
588  * also use this API for attributes of type role, form, URL, lookup, or
589  * document.
590  * @param itemtype Item Type
591  * @param itemkey Item Key
592  * @param aname Attribute Name
593  * @param ignore_notfound Ignore if Not Found
594  * @return Text Attribute Value
595  * @rep:scope public
596  * @rep:lifecycle active
597  * @rep:displayname Get Text Item Attribute Value
598  * @rep:compatibility S
599  * @rep:ihelp FND/@eng_api#a_getp See the related online help
600  */
601 function GetItemAttrText(itemtype in varchar2,
602                          itemkey in varchar2,
603                          aname in varchar2,
604                          ignore_notfound in boolean default FALSE)
605 return varchar2;
606 
607 --
608 -- GetItemAttrNumber (PUBLIC)
609 --   Get the value of a number item attribute.
610 --   Attribute must be a NUMBER-type attribute.
611 -- IN:
615 -- RETURNS:
612 --   itemtype - Item type
613 --   itemkey - Item key
614 --   aname - Attribute Name
616 --   Attribute value
617 --
618 /*#
619  * Returns the value of an item type number attribute in a process.
620  * @param itemtype Item Type
621  * @param itemkey Item Key
622  * @param aname Attribute Name
623  * @param ignore_notfound Ignore if Not Found
624  * @return Number Attribute Value
625  * @rep:scope public
626  * @rep:lifecycle active
627  * @rep:displayname Get Number Item Attribute Value
628  * @rep:compatibility S
629  * @rep:ihelp FND/@eng_api#a_getp See the related online help
630  */
631 function GetItemAttrNumber(itemtype in varchar2,
632                            itemkey in varchar2,
633                            aname in varchar2,
634                            ignore_notfound in boolean default FALSE)
635 return number;
636 
637 --
638 -- GetItemAttrDate (PUBLIC)
639 --   Get the value of a date item attribute.
640 --   Attribute must be a DATE-type attribute.
641 -- IN:
642 --   nid - Item id
643 --   aname - Attribute Name
644 -- RETURNS:
645 --   Attribute value
646 --
647 /*#
648  * Returns the value of an item type date attribute in a process.
649  * @param itemtype Item Type
650  * @param itemkey Item Key
651  * @param aname Attribute Name
652  * @param ignore_notfound Ignore if Not Found
653  * @return Date Attribute Value
654  * @rep:scope public
655  * @rep:lifecycle active
656  * @rep:displayname Get Date Item Attribute Value
657  * @rep:compatibility S
658  * @rep:ihelp FND/@eng_api#a_getp See the related online help
659  */
660 function GetItemAttrDate (itemtype in varchar2,
661                           itemkey in varchar2,
662                           aname in varchar2,
663                           ignore_notfound in boolean default FALSE)
664 return date;
665 
666 --
667 -- GetItemAttrDocument (PUBLIC)
668 --   Get the value of a document item attribute.
669 -- IN:
670 --   itemtype - Item type
671 --   itemkey - Item key
672 --   aname - Attribute Name
673 -- RETURNS:
674 --   documentid - Document Identifier - full concatenated document attribute
675 --                strings:
676 --                nodeid:libraryid:documentid:version:document_name
677 --
678 --
679 --
680 /*#
681  * Returns the document identifier for a DM document-type item attribute.
682  * The document identifier is a concatenated string of the following values:
683  * DM:<nodeid>:<documentid>:<version>
684  * <nodeid> is the node ID assigned to the document management system node as
685  * defined in the Document Management Nodes web page. <documentid> is the
686  * document ID of the document, as assigned by the document management system
687  * where the document resides. <version> is the version of the document. If a
688  * version is not specified, the latest version is assumed.
689  * @param itemtype Item Type
690  * @param itemkey Item Key
691  * @param aname Attribute Name
692  * @param ignore_notfound Ignore if Not Found
693  * @return Document ID
694  * @rep:scope public
695  * @rep:lifecycle active
696  * @rep:displayname Get Document Item Attribute Value
697  * @rep:compatibility S
698  * @rep:ihelp FND/@eng_api#a_giad See the related online help
699  */
700 Function GetItemAttrDocument(itemtype in varchar2,
701                               itemkey in varchar2,
702                               aname in varchar2,
703                               ignore_notfound in boolean default FALSE)
704 RETURN VARCHAR2;
705 
706 
707 --
708 -- GetActivityAttrInfo (PUBLIC)
709 --   Get type information about an activity attribute.
710 -- IN:
711 --   itemtype - Item type
712 --   itemkey - Item key
713 --   actid - Process activity id
714 --   aname - Attribute name
715 -- OUT:
716 --   atype  - Attribute type
717 --   subtype - 'SEND' or 'RESPOND',
718 --   format - Attribute format
719 --
720 /*#
721  * Returns information about an activity attribute, such as its type and format,
722  * if any is specified. This procedure currently does not return any subtype
723  * information for activity attributes.
724  * @param itemtype Item Type
725  * @param itemkey Item Key
726  * @param actid Activity ID
727  * @param aname Attribute Name
728  * @param atype Attribute Type
729  * @param subtype Attribute Subtype
730  * @param format Attribute Format
731  * @rep:scope public
732  * @rep:lifecycle active
733  * @rep:displayname Get Activity Attribute Information
734  * @rep:compatibility S
735  * @rep:ihelp FND/@eng_api#a_getaainfo See the related online help
736  */
737 procedure GetActivityAttrInfo(itemtype in varchar2,
738                               itemkey in varchar2,
739                               actid in number,
740                               aname in varchar2,
741                               atype out NOCOPY varchar2,
742                               subtype out NOCOPY varchar2,
743                               format out NOCOPY varchar2);
744 
745 --
746 -- GetActivityAttrText (PUBLIC)
747 --   Get the value of a text item attribute.
748 --   If the attribute is a NUMBER or DATE type, then translate the
749 --   number/date value to a text-string representation using attrbute format.
750 --   For all other types, get the value directly.
754 --   actid - Process activity id
751 -- IN:
752 --   itemtype - Item type
753 --   itemkey - Item key
755 --   aname - Attribute Name
756 -- RETURNS:
757 --   Attribute value
758 --
759 /*#
760  * Returns the value of a text activity attribute in a process. You can
761  * also use this API for attributes of type role, form, URL, lookup,
762  * attribute, or document.
763  * @param itemtype Item Type
764  * @param itemkey Item Key
765  * @param actid Activity ID
766  * @param aname Attribute Name
767  * @param ignore_notfound Ignore if not found
768  * @return Text Activity Attribute Value
769  * @rep:scope public
770  * @rep:lifecycle active
771  * @rep:displayname Get Text Activity Attribute Value
772  * @rep:compatibility S
773  * @rep:ihelp FND/@eng_api#a_getaa See the related online help
774  */
775 function GetActivityAttrText(itemtype in varchar2,
776                              itemkey in varchar2,
777                              actid in number,
778                              aname in varchar2,
779                              ignore_notfound in boolean default FALSE)
780 return varchar2;
781 
782 --
783 -- GetActivityAttrNumber (PUBLIC)
784 --   Get the value of a number item attribute.
785 --   Attribute must be a NUMBER-type attribute.
786 -- IN:
787 --   itemtype - Item type
788 --   itemkey - Item key
789 --   actid - Process activity id
790 --   aname - Attribute Name
791 -- RETURNS:
792 --   Attribute value
793 --
794 /*#
795  * Returns the value of a number activity attribute in a process.
796  * @param itemtype Item Type
797  * @param itemkey Item Key
798  * @param actid Activity ID
799  * @param aname Attribute Name
800  * @param ignore_notfound Ignore if not found
801  * @return Number Activity Attribute Value
802  * @rep:scope public
803  * @rep:lifecycle active
804  * @rep:displayname Get Number Activity Attribute Value
805  * @rep:compatibility S
806  * @rep:ihelp FND/@eng_api#a_getaa See the related online help
807  */
808 function GetActivityAttrNumber(itemtype in varchar2,
809                                itemkey in varchar2,
810                                actid in number,
811                                aname in varchar2,
812                                ignore_notfound in boolean default FALSE)
813 return number;
814 
815 --
816 -- GetActivityAttrDate (PUBLIC)
817 --   Get the value of a date item attribute.
818 --   Attribute must be a DATE-type attribute.
819 -- IN:
820 --   itemtype - Item type
821 --   itemkey - Item key
822 --   actid - Process activity id
823 --   aname - Attribute Name
824 -- RETURNS:
825 --   Attribute value
826 --
827 /*#
828  * Returns the value of a date activity attribute in a process.
829  * @param itemtype Item Type
830  * @param itemkey Item Key
831  * @param actid Activity ID
832  * @param aname Attribute Name
833  * @param ignore_notfound Ignore if not found
834  * @return Date Activity Attribute Value
835  * @rep:scope public
836  * @rep:lifecycle active
837  * @rep:displayname Get Date Activity Attribute Value
838  * @rep:compatibility S
839  * @rep:ihelp FND/@eng_api#a_getaa See the related online help
840  */
841 function GetActivityAttrDate(itemtype in varchar2,
842                              itemkey in varchar2,
843                              actid in number,
844                              aname in varchar2,
845                              ignore_notfound in boolean default FALSE)
846 return date;
847 
848 --
849 -- Set_Item_Parent (PUBLIC)
850 -- *** OBSOLETE - Use SetItemParent instead ***
851 --
852 procedure Set_Item_Parent(itemtype in varchar2,
853   itemkey in varchar2,
854   parent_itemtype in varchar2,
855   parent_itemkey in varchar2,
856   parent_context in varchar2);
857 
858 --
859 -- SetItemParent (PUBLIC)
860 --   Set the parent info of an item
861 -- IN
862 --   itemtype - Item type
863 --   itemkey - Item key
864 --   parent_itemtype - Itemtype of parent
865 --   parent_itemkey - Itemkey of parent
866 --   parent_context - Context info about parent
867 --
868 /*#
869  * Defines the parent/child relationship for a master process and a detail
870  * process. This API must be called by any detail process spawned from a
871  * master process to define the parent/child relationship between the two
872  * processes. You make a call to this API after you call the CreateProcess
873  * API, but before you call the StartProcess API for the detail process.
874  * @param itemtype Child Item Type
875  * @param itemkey Child Item Key
876  * @param parent_itemtype Parent Item Type
877  * @param parent_itemkey Parent Item Key
878  * @param parent_context Parent Context
879  * @param masterdetail Master Detail Coordination
880  * @rep:scope public
881  * @rep:lifecycle active
882  * @rep:displayname Set Item Parent
883  * @rep:compatibility S
884  * @rep:ihelp FND/@eng_api#parent See the related online help
885  */
886 procedure SetItemParent(itemtype in varchar2,
887   itemkey in varchar2,
888   parent_itemtype in varchar2,
889   parent_itemkey in varchar2,
890   parent_context in varchar2,
891   masterdetail   in boolean default NULL);
892 
893 --
894 -- SetItemOwner (PUBLIC)
898 --   itemkey - Item key
895 --   Set the owner of an item
896 -- IN
897 --   itemtype - Item type
899 --   owner - Role designated as owner of the item
900 --
901 /*#
902  * Sets the owner of existing items. The owner must be a valid role. Typically,
903  * the role that initiates a transaction is assigned as the process owner, so
904  * that any participant in that role can find and view the status of that
905  * process instance in the Workflow Monitor.
906  * @param itemtype Item Type
907  * @param itemkey Item Key
908  * @param owner Item Owner Role
909  * @rep:scope public
910  * @rep:lifecycle active
911  * @rep:displayname Set Item Owner
912  * @rep:compatibility S
913  * @rep:ihelp FND/@eng_api#itown See the related online help
914  */
915 procedure SetItemOwner(
916   itemtype in varchar2,
917   itemkey in varchar2,
918   owner in varchar2);
919 
920 --
921 -- GetItemUserKey (PUBLIC)
922 --   Get the user key of an item
923 -- IN
924 --   itemtype - Item type
925 --   itemkey - Item key
926 -- RETURNS
927 --   User key of the item
928 --
929 /*#
930  * Returns the user-friendly key assigned to an item in a process, identified by
931  * an item type and item key. The user key is a user-friendly identifier to
932  * locate items in the Workflow Monitor and other user interface components of
933  * Oracle Workflow.
934  * @param itemtype Item Type
935  * @param itemkey Item Key
936  * @return Item User Key
937  * @rep:scope public
938  * @rep:lifecycle active
939  * @rep:displayname Get Item User Key
940  * @rep:compatibility S
941  * @rep:ihelp FND/@eng_api#a_getikey See the related online help
942  */
943 function GetItemUserKey(
944   itemtype in varchar2,
945   itemkey in varchar2)
946 return varchar2;
947 
948 --
949 -- SetItemUserKey (PUBLIC)
950 --   Set the user key of an item
951 -- IN
952 --   itemtype - Item type
953 --   itemkey - Item key
954 --   userkey - User key to be set
955 --
956 /*#
957  * Sets a user-friendly identifier for an item in a process, which is initially
958  * identified by an item type and item key. The user key is intended to be a
959  * user-friendly identifier to locate items in the Workflow Monitor and other
960  * user interface components of Oracle Workflow.
961  * @param itemtype Item Type
962  * @param itemkey Item Key
963  * @param userkey User Key
964  * @rep:scope public
965  * @rep:lifecycle active
966  * @rep:displayname Set Item User Key
967  * @rep:compatibility S
968  * @rep:ihelp FND/@eng_api#a_setikey See the related online help
969  */
970 procedure SetItemUserKey(
971   itemtype in varchar2,
972   itemkey in varchar2,
973   userkey in varchar2);
974 
975 --
976 -- GetActivityLabel (PUBLIC)
977 --  Get activity instance label given id, in a format
978 --  suitable for passing to other wf_engine apis.
979 -- IN
980 --   actid - activity instance id
981 -- RETURNS
982 --   <process_name>||':'||<instance_label>
983 --
984 /*#
985  * Returns the instance label of an activity, given the internal activity
986  * instance ID. The label returned has the following format, which is
987  * suitable for passing to other Workflow Engine APIs, such as
988  * CompleteActivity and HandleError, that accept activity labels as
989  * arguments:
990  *  <br> <process_name>:<instance_label>
991  * @param actid Activity ID
992  * @return Activity Label
993  * @rep:scope public
994  * @rep:lifecycle active
995  * @rep:displayname Get Activity Label
996  * @rep:compatibility S
997  * @rep:ihelp FND/@eng_api#a_getlabel See the related online help
998  */
999 function GetActivityLabel(
1000   actid in number)
1001 return varchar2;
1002 
1003 --
1004 -- CB (PUBLIC)
1005 --   This is the callback function used by the notification system to
1006 --   get and set process attributes, and mark a process complete.
1007 --
1008 --   The command may be one of 'GET', 'SET', 'COMPLETE', or 'ERROR'.
1009 --     GET - Get the value of an attribute
1010 --     SET - Set the value of an attribute
1011 --     COMPLETE - Mark the activity as complete
1012 --     ERROR - Mark the activity as error status
1013 --     TESTCTX - Test current context via selector function
1014 --     FORWARD - Execute notification function for FORWARD
1015 --     TRANSFER - Execute notification function for TRANSFER
1016 --     RESPOND - Execute notification function for RESPOND
1017 --
1018 --   The context is in the format <itemtype>:<itemkey>:<activityid>.
1019 --
1020 --   The text_value/number_value/date_value fields are mutually exclusive.
1021 --   It is assumed that only one will be used, depending on the value of
1022 --   the attr_type argument ('VARCHAR2', 'NUMBER', or 'DATE').
1023 --
1024 -- IN:
1025 --   command - Action requested.  Must be one of 'GET', 'SET', or 'COMPLETE'.
1026 --   context - Context data in the form '<item_type>:<item_key>:<activity>'
1027 --   attr_name - Attribute name to set/get for 'GET' or 'SET'
1028 --   attr_type - Attribute type for 'SET'
1029 --   text_value - Text Attribute value for 'SET'
1030 --   number_value - Number Attribute value for 'SET'
1031 --   date_value - Date Attribute value for 'SET'
1032 -- OUT:
1033 --   text_value - Text Attribute value for 'GET'
1034 --   number_value - Number Attribute value for 'GET'
1038              context in varchar2,
1035 --   date_value - Date Attribute value for 'GET'
1036 --
1037 procedure CB(command in varchar2,
1039              attr_name in varchar2 default null,
1040              attr_type in varchar2 default null,
1041              text_value in out NOCOPY varchar2,
1042              number_value in out NOCOPY number,
1043              date_value in out NOCOPY date);
1044 
1045 -- Bug 2376033
1046 --  Call back function with additional input parameter to get
1047 --  value for an event attribute
1048 -- IN
1049 --   event_value - Event Attribute value for 'SET'
1050 -- OUT
1051 --   event_value - Event Attribute value for 'GET'
1052 
1053 procedure CB(command in varchar2,
1054              context in varchar2,
1055              attr_name in varchar2 default null,
1056              attr_type in varchar2 default null,
1057              text_value in out NOCOPY varchar2,
1058              number_value in out NOCOPY number,
1059              date_value in out NOCOPY date,
1060              event_value in out nocopy wf_event_t);
1061 
1062 --
1063 -- ProcessDeferred (PUBLIC)
1064 --   Process one deferred activity.
1065 -- IN
1066 --   itemtype - Item type to process.  If null process all item types.
1067 --   minthreshold - Minimum cost activity to process. No minimum if null.
1068 --   maxthreshold - Maximum cost activity to process. No maximum if null.
1069 --
1070 procedure ProcessDeferred(itemtype in varchar2 default null,
1071                           minthreshold in number default null,
1072                           maxthreshold in number default null);
1073 
1074 --
1075 -- ProcessTimeout (PUBLIC)
1076 --  Pick up one timed out activity and execute timeout transition.
1077 -- IN
1078 --  itemtype - Item type to process.  If null process all item types.
1079 --
1080 procedure ProcessTimeOut( itemtype in varchar2 default null );
1081 
1082 --
1083 -- ProcessStuckProcess (PUBLIC)
1084 --   Pick up one stuck process, mark error status, and execute error process.
1085 -- IN
1086 --   itemtype - Item type to process.  If null process all item types.
1087 --
1088 procedure ProcessStuckProcess(itemtype in varchar2 default null);
1089 
1090 --
1091 -- Background (PUBLIC)
1092 --  Process all current deferred and/or timeout activities within
1093 --  threshold limits.
1094 -- IN
1095 --   itemtype - Item type to process.  If null process all item types.
1096 --   minthreshold - Minimum cost activity to process. No minimum if null.
1097 --   maxthreshold - Maximum cost activity to process. No maximum if null.
1098 --   process_deferred - Run deferred or waiting processes
1099 --   process_timeout - Handle timeout process errors
1100 --   process_stuck - Handle stuck process errors
1101 --
1102 /*#
1103  * Runs a background engine for processing deferred activities, timed out
1104  * activities, and stuck processes using the parameters specified. The
1105  * background engine executes all activities that satisfy the given arguments
1106  * at the time that the background engine is invoked. This procedure does not
1107  * remain running long term, so you must restart this procedure periodically.
1108  * Any activities that are newly deferred or timed out or processes that become
1109  * stuck after the current background engine starts are processed by the next
1110  * background engine that is invoked. You may run a script called wfbkgchk.sql
1111  * to get a list of the activities waiting to be processed by the next
1112  * background engine run.
1113  * @param itemtype Item Type
1114  * @param minthreshold Minimum Threshold
1115  * @param maxthreshold Maximum Threshold
1116  * @param process_deferred Process Deferred Activities
1117  * @param process_timeout Process Timeout Activities
1118  * @param process_stuck Process Stuck Activities
1119  * @rep:scope public
1120  * @rep:lifecycle active
1121  * @rep:displayname Workflow Background Engine
1122  * @rep:compatibility S
1123  * @rep:ihelp FND/@eng_api#a_bckgr See the related online help
1124  */
1125 procedure Background (itemtype         in varchar2 default '',
1126                       minthreshold     in number default null,
1127                       maxthreshold     in number default null,
1128                       process_deferred in boolean default TRUE,
1129                       process_timeout  in boolean default TRUE,
1130                       process_stuck    in boolean default FALSE);
1131 
1132 --
1133 -- BackgroundConcurrent (PUBLIC)
1134 --  Run background process for deferred and/or timeout activities
1135 --  from Concurrent Manager.
1136 --  This is a cover of Background() with different argument types to
1137 --  be used by the Concurrent Manager.
1138 -- IN
1139 --   errbuf - CPM error message
1140 --   retcode - CPM return code (0 = success, 1 = warning, 2 = error)
1141 --   itemtype - Item type to process.  If null process all item types.
1142 --   minthreshold - Minimum cost activity to process. No minimum if null.
1143 --   maxthreshold - Maximum cost activity to process. No maximum if null.
1144 --   process_deferred - Run deferred or waiting processes
1145 --   process_timeout - Handle timeout errors
1146 --   process_stuck - Handle stuck process errors
1147 --
1148 procedure BackgroundConcurrent (
1149     errbuf out NOCOPY varchar2,
1150     retcode out NOCOPY varchar2,
1151     itemtype in varchar2 default '',
1152     minthreshold in varchar2 default '',
1153     maxthreshold in varchar2 default '',
1157 
1154     process_deferred in varchar2 default 'Y',
1155     process_timeout in varchar2 default 'Y',
1156     process_stuck in varchar2 default 'N');
1158 --
1159 -- CreateProcess (PUBLIC)
1160 --   Create a new runtime process (for an application item).
1161 -- IN
1162 --   itemtype - A valid item type
1163 --   itemkey  - A string generated from the application object's primary key.
1164 --   process  - A valid root process for this item type
1165 --              (or null to use the item's selector function)
1166 --   user_key - Optional parameter to avoid having to call SetItemUserKey later.
1167 --   owner_role - Optional paramer to avoid having to call SetItemOwner later.
1168 --
1169 /*#
1170  * Creates a new runtime process for an application item. For example, a
1171  * Requisition item type may have a Requisition Approval Process as a top level
1172  * process. When a particular requisition is created, an application calls
1173  * CreateProcess to set up the information needed to start the defined process.
1174  * @param itemtype Item Type
1175  * @param itemkey Item Key
1176  * @param process Process Name
1177  * @param user_key User Key
1178  * @param owner_role Item Owner Role
1179  * @rep:scope public
1180  * @rep:lifecycle active
1181  * @rep:displayname Create Runtime Process
1182  * @rep:compatibility S
1183  * @rep:ihelp FND/@eng_api#a_createp See the related online help
1184  */
1185 procedure CreateProcess(itemtype in varchar2,
1186                         itemkey  in varchar2,
1187                         process  in varchar2 default '',
1188                         user_key in varchar2 default null,
1189                         owner_role in varchar2 default null);
1190 
1191 --
1192 -- StartProcess (PUBLIC)
1193 --   Begins execution of the process. The process will be identified by the
1194 --   itemtype and itemkey.  The engine locates the starting activities
1195 --   of the root process and executes them.
1196 -- IN
1197 --   itemtype - A valid item type
1198 --   itemkey  - A string generated from the application object's primary key.
1199 --
1200 /*#
1201  * Begins execution of the specified process. The engine locates the activity
1202  * marked as START and then executes it. CreateProcess() must first be called
1203  * to define the itemtype and itemkey before calling StartProcess().
1204  * @param itemtype Item Type
1205  * @param itemkey Item Key
1206  * @rep:scope public
1207  * @rep:lifecycle active
1208  * @rep:displayname Start Process
1209  * @rep:compatibility S
1210  * @rep:ihelp FND/@eng_api#a_startp See the related online help
1211  */
1212 procedure StartProcess(itemtype in varchar2,
1213                        itemkey  in varchar2);
1214 
1215 
1216 --
1217 -- LaunchProcess (PUBLIC)
1218 --   Launch a process both creates and starts it.
1219 --   This is a wrapper for friendlier UI
1220 -- IN
1221 --   itemtype - A valid item type
1222 --   itemkey  - A string generated from the application object's primary key.
1223 --   process  - A valid root process for this item type
1224 --              (or null to use the item's selector function)
1225 --   userkey - User key to be set
1226 --   owner - Role designated as owner of the item
1227 --
1228 /*#
1229  * Launches a specified process by creating the new runtime process and beginning
1230  * its execution. This is a wrapper that combines CreateProcess and StartProcess.
1231  * @param itemtype Item Type
1232  * @param itemkey Item Key
1233  * @param process Process Name
1234  * @param userkey User Key
1235  * @param owner Item Owner Role
1236  * @rep:scope public
1237  * @rep:lifecycle active
1238  * @rep:displayname Launch Process
1239  * @rep:compatibility S
1240  * @rep:ihelp FND/@eng_api#a_launchp See the related online help
1241  */
1242 procedure LaunchProcess(itemtype in varchar2,
1243                         itemkey  in varchar2,
1244                         process  in varchar2 default '',
1245                         userkey  in varchar2 default '',
1246                         owner    in varchar2 default '');
1247 
1248 
1249 
1250 --
1251 -- SuspendProcess (PUBLIC)
1252 --   Suspends process execution, meaning no new transitions will occur.
1253 --   Outstanding notifications will be allowed to complete, but they will not
1254 --   cause activity transitions. If the process argument is null, the root
1255 --   process for the item is suspended, otherwise the named process is
1256 --   suspended.
1257 -- IN
1258 --   itemtype - A valid item type
1259 --   itemkey  - A string generated from the application object's primary key.
1260 --   process  - Process to suspend, specified in the form
1261 --              [<parent process_name>:]<process instance_label>
1262 --              If null suspend the root process.
1263 --
1264 /*#
1265  * Suspends process execution so that no new transitions occur. Outstanding
1266  * notifications can complete by calling CompleteActivity(), but the workflow
1267  * does not transition to the next activity. Restart suspended processes by
1268  * calling ResumeProcess().
1269  * @param itemtype Item Type
1270  * @param itemkey Item Key
1271  * @param process Process Name
1272  * @rep:scope public
1273  * @rep:lifecycle active
1274  * @rep:displayname Suspend Process
1275  * @rep:compatibility S
1276  * @rep:ihelp FND/@eng_api#a_suspnp See the related online help
1277  */
1278 procedure SuspendProcess(itemtype in varchar2,
1282 
1279                          itemkey  in varchar2,
1280                          process  in varchar2 default '');
1281 
1283 --
1284 -- SuspendAll (PUBLIC)) --</rwunderl:1833759>
1285 --   Suspends all processes for a given itemType.
1286 -- IN
1287 --   itemtype - A valid itemType
1288 --   process
1289 --
1290 
1291 Procedure SuspendAll (p_itemType in varchar2,
1292                       p_process in varchar2 default NULL);
1293 
1294 --
1295 -- AbortProcess (PUBLIC)
1296 --   Abort process execution. Outstanding notifications are canceled. The
1297 --   process is then considered complete, with a status specified by the
1298 --   result argument.
1299 -- IN
1300 --   itemtype - A valid item type
1301 --   itemkey  - A string generated from the application object's primary key.
1302 --   process  - Process to abort, specified in the form
1303 --              [<parent process_name>:]<process instance_label>
1304 --              If null abort the root process.
1305 --   result   - Result to complete process with
1306 --   verify_lock - TRUE if the item should be locked before processing it
1307 --   cascade  - TRUE is you want to cascade purge all master-child
1308 --              relations associated with this item
1309 --
1310 /*#
1311  * Aborts process execution and cancels outstanding notifications. The process
1312  * status is considered COMPLETE, with a result specified by the <code>result</code>
1313  * argument. Also, any outstanding notifications or subprocesses are set to a status of
1314  * COMPLETE with a result of force, regardless of the <code>result</code> argument.
1315  * @param itemtype Item Type
1316  * @param itemkey Item Key
1317  * @param process Process Name
1318  * @param result Status of Aborted Process
1319  * @param verify_lock For Internal Use Only
1320  * @param cascade For Internal Use Only
1321  * @rep:scope public
1322  * @rep:lifecycle active
1323  * @rep:displayname Abort Process
1324  * @rep:compatibility S
1325  * @rep:businessevent oracle.apps.wf.engine.abort
1326  * @rep:ihelp FND/@eng_api#a_abortp See the related online help
1327  */
1328 procedure AbortProcess(itemtype in varchar2,
1329                        itemkey  in varchar2,
1330                        process  in varchar2 default '',
1331                        result   in varchar2 default wf_engine.eng_force,
1332 		       verify_lock in boolean default FALSE,
1333 		       cascade  in boolean default FALSE);
1334 
1335 --
1336 -- ResumeProcess (PUBLIC)
1337 --   Returns a process to normal execution status. Any transitions which
1338 --   were deferred by SuspendProcess() will now be processed.
1339 -- IN
1340 --   itemtype   - A valid item type
1341 --   itemkey    - A string generated from the application object's primary key.
1342 --   process  - Process to resume, specified in the form
1343 --              [<parent process_name>:]<process instance_label>
1344 --              If null resume the root process.
1345 --
1346 /*#
1347  * Returns a suspended process to normal execution status. Any activities that
1348  * were transitioned to while the process was suspended are now executed.
1349  * @param itemtype Item Type
1350  * @param itemkey Item Key
1351  * @param process Process Name
1352  * @rep:scope public
1353  * @rep:lifecycle active
1354  * @rep:displayname Resume Process
1355  * @rep:compatibility S
1356  * @rep:ihelp FND/@eng_api#a_resump See the related online help
1357  */
1358 procedure ResumeProcess(itemtype in varchar2,
1359                         itemkey  in varchar2,
1360                         process  in varchar2 default '');
1361 
1362 
1363 --
1364 -- ResumeAll (PUBLIC) --</rwunderl:1833759>
1365 --   Resumes all processes for a given itemType.
1366 -- IN
1367 --   itemtype - A valid itemType
1368 --   process
1369 --
1370 Procedure ResumeAll (p_itemType in varchar2,
1371                      p_process  in varchar2 default NULL);
1372 
1373 
1374 --
1375 -- CreateForkProcess (PUBLIC)
1376 --   Performs equivalent of createprocess but for a forked process
1377 --   and copies all item attributes
1378 --   If same version is false, this is same as CreateProcess but copies
1379 --   item attributes as well.
1380 -- IN
1381 --   copy_itemtype  - Item type
1382 --   copy_itemkey   - item key to copy (will be stored to an item attribute)
1383 --   new_itemkey    - item key to create
1384 --   same_version   - TRUE will use same version even if out of date.
1385 --                    FALSE will use the active and current version
1386 /*#
1387  * Forks a runtime process by creating a new process that is a copy of the
1388  * original. After calling CreateForkProcess(), you can call APIs such as
1389  * SetItemOwner(), SetItemUserKey(), or the SetItemAttribute APIs to reset
1390  * any item properties or modify any item attributes that you want for the
1391  * new process. Then you must call StartForkProcess() to start the new process.
1392  * @param copy_itemtype Original Item Type
1393  * @param copy_itemkey Original Item Key
1394  * @param new_itemkey New Item Key
1395  * @param same_version Same version as original item
1396  * @param masterdetail Master-Detail Process
1397  * @rep:scope public
1398  * @rep:lifecycle active
1399  * @rep:displayname Create Fork Process
1400  * @rep:compatibility S
1401  * @rep:ihelp FND/@eng_api#a_crfork See the related online help
1402  */
1406      new_itemkey    in varchar2,
1403 Procedure CreateForkProcess (
1404      copy_itemtype  in varchar2,
1405      copy_itemkey   in varchar2,
1407      same_version   in boolean default TRUE,
1408      masterdetail   in boolean default NULL);
1409 
1410 --
1411 -- StartForkProcess (PUBLIC)
1412 --   Start a process that has been forked. Depending on the way this was forked,
1413 --   this will execute startprocess if its to start with the latest version or
1414 --   it copies the forked process activty by activity.
1415 -- IN
1416 --   itemtype  - Item type
1417 --   itemkey   - item key to start
1418 --
1419 /*#
1420  * Begins execution of the new forked process that you specify. Before you call
1421  * StartForkProcess(), you must first call CreateForkProcess() to create the
1422  * new process. You can modify the item attributes of the new process before
1423  * calling StartForkProcess().
1424  * @param itemtype Item Type
1425  * @param itemkey Item Key
1426  * @rep:scope public
1427  * @rep:lifecycle active
1428  * @rep:displayname Start Fork Process
1429  * @rep:compatibility S
1430  * @rep:ihelp FND/@eng_api#a_stfork See the related online help
1431  */
1432 procedure StartForkProcess(
1433      itemtype        in  varchar2,
1434      itemkey         in  varchar2);
1435 
1436 --
1437 -- BeginActivity (PUBLIC)
1438 --   Determines if the specified activity may currently be performed on the
1439 --   work item. This is a test that the performer may proactively determine
1440 --   that their intent to perform an activity on an item is, in fact, allowed.
1441 -- IN
1442 --   itemtype  - A valid item type
1443 --   itemkey   - A string generated from the application object's primary key.
1444 --   activity  - Completed activity, specified in the form
1445 --               [<parent process_name>:]<process instance_label>
1446 --
1447 /*#
1448  * Determines if the specified activity can currently be performed on the
1449  * process item and raises an exception if it cannot.
1450  * @param itemtype Item Type
1451  * @param itemkey Item Key
1452  * @param activity Activity Label to Begin
1453  * @rep:scope public
1454  * @rep:lifecycle active
1455  * @rep:displayname Begin Activity
1456  * @rep:compatibility S
1457  * @rep:ihelp FND/@eng_api#a_beginp See the related online help
1458  */
1459 procedure BeginActivity(itemtype in varchar2,
1460                         itemkey  in varchar2,
1461                         activity in varchar2);
1462 
1463 --
1464 -- CompleteActivity (PUBLIC)
1465 --   Notifies the workflow engine that an activity has been completed for a
1466 --   particular process(item). This procedure can have one or more of the
1467 --   following effects:
1468 --   o Creates a new item. If the completed activity is the start of a process,
1469 --     then a new item can be created by this call. If the completed activity
1470 --     is not the start of a process, it would be an invalid activity error.
1471 --   o Complete an activity with an optional result. This signals the
1472 --     workflow engine that an asynchronous activity has been completed.
1473 --     An optional activity completion result can also be passed.
1474 -- IN
1475 --   itemtype  - A valid item type
1476 --   itemkey   - A string generated from the application object's primary key.
1477 --   activity  - Completed activity, specified in the form
1478 --               [<parent process_name>:]<process instance_label>
1479 --   <result>  - An optional result.
1480 --
1481 /*#
1482  * Notifies the Workflow Engine that the specified activity has been completed
1483  * for a particular item. This procedure can be called either to indicate a
1484  * completed activity with an optional result or to create and start an item.
1485  * @param itemtype Item Type
1486  * @param itemkey Item Key
1487  * @param activity Activity Label to Complete
1488  * @param result Result
1489  * @rep:scope public
1490  * @rep:lifecycle active
1491  * @rep:displayname Complete Activity
1492  * @rep:compatibility S
1493  * @rep:ihelp FND/@eng_api#comact See the related online help
1494  */
1495 procedure CompleteActivity(itemtype in varchar2,
1496                            itemkey  in varchar2,
1497                            activity in varchar2,
1498                            result   in varchar2);
1499 
1500 --
1501 -- CompleteActivityInternalName (PUBLIC)
1502 --   Identical to CompleteActivity, except that the internal name of
1503 --   completed activity is passed instead of the activity instance label.
1504 -- NOTES:
1505 -- 1. There must be exactly ONE instance of this activity with NOTIFIED
1506 --    status.
1507 -- 2. Using this api to start a new process is not supported.
1508 -- 3. Synchronous processes are not supported in this api.
1509 -- 4. This should only be used if for some reason the instance label is
1510 --    not known.  CompleteActivity should be used if the instance
1511 --    label is known.
1512 -- IN
1513 --   itemtype  - A valid item type
1514 --   itemkey   - A string generated from the application object's primary key.
1515 --   activity  - Internal name of completed activity, in the format
1516 --               [<parent process_name>:]<process activity_name>
1517 --   <result>  - An optional result.
1518 --
1519 /*#
1520  * Notifies the Workflow Engine that the specified activity has been completed
1521  * for a particular item. This procedure requires that the activity currently
1525  * activity to be completed by the activity's internal name, while
1522  * has a status of 'Notified'. An optional activity completion result can also
1523  * be passed. The result can determine what transition the process takes next.
1524  * This API is similar to CompleteActivity() except that this API identifies the
1526  * CompleteActivity() identifies the activity by the activity node label name.
1527  * @param itemtype Item Type
1528  * @param itemkey Item Key
1529  * @param activity Activity Label to Complete
1530  * @param result Result
1531  * @rep:scope public
1532  * @rep:lifecycle active
1533  * @rep:displayname Complete Activity Internal Name
1534  * @rep:compatibility S
1535  * @rep:ihelp FND/@eng_api#comactin See the related online help
1536  */
1537 procedure CompleteActivityInternalName(
1538   itemtype in varchar2,
1539   itemkey  in varchar2,
1540   activity in varchar2,
1541   result   in varchar2);
1542 
1543 --
1544 -- AssignActivity (PUBLIC)
1545 --   Assigns or re-assigns the user who will perform an activity. It may be
1546 --   called before the activity has been enabled(transitioned to). If a user
1547 --   is assigned to an activity that already has an outstanding notification,
1548 --   that notification will be canceled and a new notification will be
1549 --   generated for the new user.
1550 -- IN
1551 --   itemtype     - A valid item type
1552 --   itemkey      - A string generated from the application object's primary key.
1553 --   activity     - Activity to assign, specified in the form
1554 --                  [<parent process_name>:]<process instance_label>
1555 --   performer    - User who will perform this activity.
1556 --   reassignType - DELEGATE, TRANSFER or null
1557 --   ntfComments  - Comments while reassigning
1558 /*#
1559  * Assigns or reassigns an activity to another performer. This procedure may be
1560  * called before the activity is transitioned to. For example, a function
1561  * activity earlier in the process may determine the performer of a later
1562  * activity. If a new user is assigned to a notification activity that already
1563  * has an outstanding notification, the outstanding notification is canceled and
1564  * a new notification is generated for the new user by calling
1565  * WF_Notification.Transfer.
1566  * @param itemtype Item Type
1567  * @param itemkey Item Key
1568  * @param activity Activity Label
1569  * @param performer Performer Role
1570  * @param reassignType For Internal Use Only
1571  * @param ntfComments For Internal Use Only
1572  * @rep:scope public
1573  * @rep:lifecycle active
1574  * @rep:displayname Assign Performer to Activity
1575  * @rep:compatibility S
1576  * @rep:ihelp FND/@eng_api#a_assigp See the related online help
1577  */
1578 procedure AssignActivity(itemtype in varchar2,
1579                          itemkey  in varchar2,
1580                          activity in varchar2,
1581                          performer in varchar2,
1582                          reassignType in varchar2 default null,
1583                          ntfComments in varchar2 default null);
1584 
1585 --
1586 -- HandleError (PUBLIC)
1587 --   Reset the process thread to given activity and begin execution
1588 -- again from that point.  If command is:
1589 --     SKIP - mark the activity complete with given result and continue
1590 --     RETRY - re-execute the activity before continuing
1591 -- IN
1592 --   itemtype  - A valid item type.
1593 --   itemkey   - The item key of the process.
1594 --   activity  - Activity to reset, specified in the form
1595 --               [<parent process_name>:]<process instance_label>
1596 --   command   - SKIP or RETRY.
1597 --   <result>  - Activity result for the "SKIP" command.
1598 --
1599 /*#
1600  * Handles any process activity that has encountered an error, when
1601  * called from an activity in an ERROR process. You can also call this procedure
1602  * for any arbitrary activity in a process, to rollback part of your process to
1606  * may precede the activity node label name with the internal name of its parent
1603  * that activity. The activity that you call this procedure with can have any
1604  * status and does not need to have been executed. The activity can also be in a
1605  * subprocess. If the activity node label is not unique within the process you
1607  * process.
1608  * For example, <parent_process_internal_name>:<label_name>.
1609  * This procedure clears the activity specified and all activities following it
1610  * that have already been transitioned to by reexecuting each activity in
1611  * 'Cancel' mode. For an activity in the 'Error' state, there are no other
1612  * executed activities following it, so the procedure simply clears the errored
1613  * activity. Once the activities are cleared, this procedure resets any parent
1614  * processes of the specified activity to a status of 'Active', if they are not
1615  * already active. The procedure then handles the specified activity based on
1616  * the command you provide: SKIP or RETRY.
1617  * @param itemtype Item Type
1618  * @param itemkey Item Key
1619  * @param activity Activity Label to Handle
1620  * @param command Command (SKIP or RETRY)
1621  * @param result Result
1622  * @rep:scope public
1623  * @rep:lifecycle active
1624  * @rep:displayname Handle Error
1625  * @rep:compatibility S
1626  * @rep:businessevent oracle.apps.wf.engine.skip
1627  * @rep:businessevent oracle.apps.wf.engine.retry
1628  * @rep:ihelp FND/@eng_api#a_handp See the related online help
1629  */
1630 procedure HandleError(itemtype in varchar2,
1631                       itemkey  in varchar2,
1632                       activity in varchar2,
1633                       command  in varchar2,
1634                       result   in varchar2 default '');
1635 
1636 -- HandleErrorAll (PUBLIC)
1637 --   Reset the process thread to the given item type and/or item key.
1638 --   It only run in RETRY mode.
1639 -- IN
1640 --   itemtype  - A valid item type.
1641 --   itemkey   - The item key of the process.
1642 --   docommit  - True if you want a commit for every n iterations.
1643 --               n is defined as wf_engine.commit_frequency
1644 --
1645 procedure HandleErrorAll(itemtype in varchar2,
1646                          itemkey  in varchar2 default null,
1647                          activity in varchar2 default null,
1648                          command  in varchar2 default null,
1649                          result   in varchar2 default '',
1650                          docommit in boolean  default true);
1651 
1652 /*#
1653  * Returns the status and result for the root process of the specified item
1654  * instance. Possible values returned for the status are: ACTIVE, COMPLETE,
1655  * ERROR, or SUSPENDED. If the root process does not exist, then the item
1656  * key does not exist and will thus cause the procedure to raise an exception.
1657  * @param itemtype Item Type
1658  * @param itemkey Item Key
1659  * @param status Status
1660  * @param result Result
1661  * @rep:scope public
1662  * @rep:lifecycle active
1663  * @rep:displayname Item Status
1664  * @rep:compatibility S
1665  * @rep:ihelp FND/@eng_api#a_is See the related online help
1666  */
1667 procedure ItemStatus(itemtype in varchar2,
1668                      itemkey  in varchar2,
1669                      status   out NOCOPY varchar2,
1670                      result   out NOCOPY varchar2);
1671 
1672 procedure ItemInfo(itemtype      in  varchar2,
1673                    itemkey       in  varchar2,
1674                    status        out NOCOPY varchar2,
1675                    result        out NOCOPY varchar2,
1676                    actid         out NOCOPY number,
1677                    errname       out NOCOPY varchar2,
1678                    errmsg        out NOCOPY varchar2,
1679                    errstack      out NOCOPY varchar2);
1680 
1681 
1682 --
1683 -- Activity_Exist_In_Process
1684 --   ### OBSOLETE - Use FindActivity instead ###
1685 --
1686 function Activity_Exist_In_Process (
1687   p_item_type          in  varchar2,
1688   p_item_key           in  varchar2,
1689   p_activity_item_type in  varchar2 default null,
1690   p_activity_name      in  varchar2)
1691 return boolean;
1692 
1693 --
1694 -- Activity_Exist
1695 --   ### OBSOLETE - Use FindActivity instead ###
1696 --
1697 function Activity_Exist (
1698   p_process_item_type  in  varchar2,
1699   p_process_name       in  varchar2,
1700   p_activity_item_type in  varchar2 default null,
1701   p_activity_name      in  varchar2,
1702   active_date          in  date default sysdate,
1703   iteration            in  number default 0)
1704 return boolean;
1705 
1706 --
1707 -- EVENT activity related constants/functions
1708 --
1709 
1710 -- Activity types
1711 eng_event           varchar2(8) := 'EVENT';    -- Event activity
1712 
1713 -- Event directions
1714 eng_receive         varchar2(8) := 'RECEIVE'; -- Recieve incoming event
1715 eng_raise           varchar2(8) := 'RAISE';    -- Generate new event
1716 eng_send            varchar2(8) := 'SEND';    -- Transfer event
1717 
1718 -- Event activity attribute names
1719 eng_eventname       varchar2(30) := '#EVENTNAME';
1720 eng_eventkey        varchar2(30) := '#EVENTKEY';
1721 eng_eventmessage    varchar2(30) := '#EVENTMESSAGE';
1722 eng_eventoutagent   varchar2(30) := '#EVENTOUTAGENT';
1723 eng_eventtoagent    varchar2(30) := '#EVENTTOAGENT';
1727 eng_block_mode      varchar2(30)  := '#BLOCK_MODE';
1724 eng_defaultevent    varchar2(30) := '#EVENTMESSAGE2';
1725 
1726 -- Send event activity attribute for OTA Callback
1728 eng_cb_event_name   varchar2(240) := '#CB_EVENT_NAME';
1729 eng_cb_event_key    varchar2(2000):= '#CB_EVENT_KEY';
1730 
1731 --
1732 -- GetItemAttrClob (PUBLIC)
1733 --   Get display contents of item attribute as a clob
1734 -- NOTE
1735 --   Returns expanded content of attribute.
1736 --   For DOCUMENT-type attributes, this will be the actual document
1737 --   generated.  For all other types, this will be the displayed
1738 --   value of the attribute.
1739 --   Use GetItemAttrText to retrieve internal key.
1740 -- IN
1741 --   itemtype - item type
1742 --   itemkey - item key
1743 --   aname - item attribute name
1744 -- RETURNS
1745 --   Expanded content of item attribute as a clob
1746 --
1747 /*#
1748  * Returns the value of an item type attribute in a process as a character large
1749  * object (CLOB).
1750  * @param itemtype Item Type
1751  * @param itemkey Item Key
1752  * @param aname Attribute Name
1753  * @return Item Attribute Value as CLOB
1754  * @rep:scope public
1755  * @rep:lifecycle active
1756  * @rep:displayname Get Item Attribute Value as CLOB
1757  * @rep:compatibility S
1758  * @rep:ihelp FND/@eng_api#a_giac See the related online help
1759  */
1760 function GetItemAttrClob(
1761   itemtype in varchar2,
1762   itemkey in varchar2,
1763   aname in varchar2)
1764 return clob;
1765 
1766 --
1767 -- GetActivityAttrClob (PUBLIC)
1768 --   Get display contents of activity attribute as a clob
1769 -- NOTE
1770 --   Returns expanded content of attribute.
1771 --   For DOCUMENT-type attributes, this will be the actual document
1772 --   generated.  For all other types, this will be the displayed
1773 --   value of the attribute.
1774 --   Use GetActivityAttrText to retrieve internal key.
1775 -- IN
1776 --   itemtype - item type
1777 --   itemkey - item key
1778 --   aname - activity attribute name
1779 -- RETURNS
1780 --   Expanded content of activity attribute as a clob
1781 --
1782 /*#
1783  * Returns the value of an activity attribute in a process as a character large
1784  * object (CLOB).
1785  * @param itemtype Item Type
1786  * @param itemkey Item Key
1787  * @param actid Activity ID
1788  * @param aname Attribute Name
1789  * @return Activity Attribute Value as CLOB
1790  * @rep:scope public
1791  * @rep:lifecycle active
1792  * @rep:displayname Get Activity Attribute Value as CLOB
1793  * @rep:compatibility S
1794  * @rep:ihelp FND/@eng_api#a_getaac See the related online help
1795  */
1796 function GetActivityAttrClob(
1797   itemtype in varchar2,
1798   itemkey in varchar2,
1799   actid in number,
1800   aname in varchar2)
1801 return clob;
1802 
1803 --
1804 -- SetItemAttrEvent
1805 --   Set event-type item attribute
1806 -- IN
1807 --   itemtype - process item type
1808 --   itemkey - process item key
1809 --   name - attribute name
1810 --   event - attribute value
1811 --
1812 procedure SetItemAttrEvent(
1813   itemtype in varchar2,
1814   itemkey in varchar2,
1815   name in varchar2,
1816   event in wf_event_t);
1817 
1818 --
1819 -- GetItemAttrEvent
1820 --   Get event-type item attribute
1821 -- IN
1822 --   itemtype - process item type
1823 --   itemkey - process item key
1824 --   name - attribute name
1825 -- RETURNS
1826 --   Attribute value
1827 --
1828 function GetItemAttrEvent(
1829   itemtype in varchar2,
1830   itemkey in varchar2,
1831   name in varchar2)
1832 return wf_event_t;
1833 
1834 --
1835 -- GetActivityAttrEvent
1836 --   Get event-type activity attribute
1837 -- IN
1838 --   itemtype - process item type
1839 --   itemkey - process item key
1840 --   actid - current activity id
1841 --   name - attribute name
1842 -- RETURNS
1843 --   Attribute value
1844 --
1845 function GetActivityAttrEvent(
1846   itemtype in varchar2,
1847   itemkey in varchar2,
1848   actid in number,
1849   name in varchar2)
1850 return wf_event_t;
1851 
1852 --
1853 -- Event
1854 --   Signal event to workflow process
1855 -- IN
1856 --   itemtype - Item type of process
1857 --   itemkey - Item key of process
1858 --   process_name - Process to start (only if process not already running)
1859 --   event_message - Event message payload
1860 --
1861 /*#
1862  * Receives an event from the Business Event System into a workflow
1863  * process. If the specified item key already exists, the event is received into
1864  * that item. If the item key does not already exist, but the specified process
1865  * includes an eligible Receive event activity marked as a Start activity, the
1866  * Workflow Engine creates a new item running that process. Within the workflow
1867  * process that receives the event, the procedure searches for eligible Receive
1868  * event activities. An activity is only eligible to receive an event if its
1869  * event filter is either blank, set to an event group of which that event is a
1873  * @param itemkey Item Key
1870  * member, or set to that particular event. Additionally, the activity must have
1871  * an appropriate status.
1872  * @param itemtype Item Type
1874  * @param process_name Process Name
1875  * @param event_message Event Message
1876  * @rep:scope public
1877  * @rep:lifecycle active
1878  * @rep:displayname Event
1879  * @rep:compatibility S
1880  * @rep:ihelp FND/@eng_api#a_engevent See the related online help
1881  */
1882 procedure Event(
1883   itemtype in varchar2,
1884   itemkey in varchar2,
1885   process_name in varchar2 default null,
1886   event_message in wf_event_t);
1887 
1888 --
1889 -- Event2
1890 --   Signal event to workflow process
1891 -- IN
1892 --   event_message - Event message payload
1893 --
1894 procedure Event2(
1895   event_message in wf_event_t);
1896 
1897 --
1898 -- AddToItemAttrNumber
1899 --   Increments (or decrements) an numeric item attribute and returns the
1900 --   new value.  If the item attribute does not exist, it returns null.
1901 -- IN
1902 --   p_itemtype - process item type
1903 --   p_itemkey - process item key
1904 --   p_aname - Item Attribute Name
1905 --   p_name - attribute name
1906 --   p_addend - Numeric value to be added to the item attribute.
1907 --
1908 -- RETURNS
1909 --   Attribute value (NUMBER) or NULL if attribute does not exist.
1910 --
1911 function AddToItemAttrNumber(
1912   p_itemtype in varchar2,
1913   p_itemkey in varchar2,
1914   p_aname in varchar2,
1915   p_addend in number)
1916 return number;
1917 
1918 -- Bug 5903106
1919 -- HandleErrorConcurrent
1920 --   Concurrent Program API to handle any process activity that has
1921 --   encountered an error. This Concurrent Program API is a wrapper
1922 --   to HandleError and HandleErrorAll based on the parameter values
1923 --   supplied.
1924 -- IN
1925 --   p_errbuf
1926 --   p_retcode
1927 --   p_itemtype   - Workflow Itemtype
1928 --   p_itemkey    - Itemkey of the process
1929 --   p_activity   - Workflow process activity label
1930 --   p_start_date - Errored On or After date
1931 --   p_end_date   - Errored On or Before date
1932 --   p_max_retry  - Maximum retries allowed on an activity
1933 --   p_docommit   - True if you want a commit for every n iterations.
1934 --                  n is defined as wf_engine.commit_frequency
1935 --
1936 procedure HandleErrorConcurrent(p_errbuf    out nocopy varchar2,
1937                                 p_retcode   out nocopy varchar2,
1938                                 p_itemtype  in  varchar2,
1939                                 p_itemkey   in  varchar2 default null,
1940                                 p_process   in  varchar2 default null,
1941                                 p_activity  in  varchar2 default null,
1942                                 p_start_date in varchar2 default null,
1943                                 p_end_date  in  varchar2 default null,
1944                                 p_max_retry in  varchar2 default null,
1945                                 p_docommit  in  varchar2 default null);
1946 -- bug 6161171
1947 procedure AbortProcess2(itemtype    in varchar2,
1948                         itemkey     in varchar2,
1949                         process     in varchar2       default '',
1950                         result      in varchar2       default wf_engine.eng_force,
1951                         verify_lock in binary_integer default 0,
1952                         cascade     in binary_integer default 0);
1953 
1954 
1955 END WF_ENGINE;