DBA Data[Home] [Help]

PACKAGE: APPS.WF_ENGINE

Source


1 package WF_ENGINE AUTHID CURRENT_USER as
2 /* $Header: wfengs.pls 120.8.12020000.2 2012/10/02 21:28:18 alsosa 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
324 --   aname - Attribute Name
325 --   avalue - New value for attribute
326 --
327 /*#
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 /*#
379  * @param aname Attribute Name
376  * Sets the value of a number item type attribute in a process.
377  * @param itemtype Item Type
378  * @param itemkey Item Key
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
468  * @rep:lifecycle active
469  * @rep:displayname Set Item Attribute Text Array
470  * @rep:compatibility S
471  * @rep:ihelp FND/@eng_api#a_siaa See the related online help
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
531  * @rep:displayname Set Item Attribute Date Array
528  * @param avalue Attribute Value Array
529  * @rep:scope public
530  * @rep:lifecycle active
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:
612 --   itemtype - Item type
613 --   itemkey - Item key
614 --   aname - Attribute Name
615 -- RETURNS:
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>
687  * where the document resides. <version> is the version of the document. If a
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
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.
751 -- IN:
752 --   itemtype - Item type
753 --   itemkey - Item key
754 --   actid - Process activity id
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
836  * @rep:lifecycle active
833  * @param ignore_notfound Ignore if not found
834  * @return Date Activity Attribute Value
835  * @rep:scope public
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)
895 --   Set the owner of an item
896 -- IN
897 --   itemtype - Item type
898 --   itemkey - Item key
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
992  * @return Activity Label
989  * arguments:
990  *  <br> <process_name>:<instance_label>
991  * @param actid Activity ID
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'
1035 --   date_value - Date Attribute value for 'GET'
1036 --
1037 procedure CB(command in varchar2,
1038              context 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
1124  */
1121  * @rep:displayname Workflow Background Engine
1122  * @rep:compatibility S
1123  * @rep:ihelp FND/@eng_api#a_bckgr See the related online help
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 '',
1154     process_deferred in varchar2 default 'Y',
1155     process_timeout in varchar2 default 'Y',
1156     process_stuck in varchar2 default 'N',
1157     instance_number in number default 0);
1158 
1159 --
1160 -- CreateProcess (PUBLIC)
1161 --   Create a new runtime process (for an application item).
1162 -- IN
1163 --   itemtype - A valid item type
1164 --   itemkey  - A string generated from the application object's primary key.
1165 --   process  - A valid root process for this item type
1166 --              (or null to use the item's selector function)
1167 --   user_key - Optional parameter to avoid having to call SetItemUserKey later.
1168 --   owner_role - Optional paramer to avoid having to call SetItemOwner later.
1169 --
1170 /*#
1171  * Creates a new runtime process for an application item. For example, a
1172  * Requisition item type may have a Requisition Approval Process as a top level
1173  * process. When a particular requisition is created, an application calls
1174  * CreateProcess to set up the information needed to start the defined process.
1175  * @param itemtype Item Type
1176  * @param itemkey Item Key
1177  * @param process Process Name
1178  * @param user_key User Key
1179  * @param owner_role Item Owner Role
1180  * @rep:scope public
1181  * @rep:lifecycle active
1182  * @rep:displayname Create Runtime Process
1183  * @rep:compatibility S
1184  * @rep:ihelp FND/@eng_api#a_createp See the related online help
1185  */
1186 procedure CreateProcess(itemtype in varchar2,
1187                         itemkey  in varchar2,
1188                         process  in varchar2 default '',
1189                         user_key in varchar2 default null,
1190                         owner_role in varchar2 default null);
1191 
1192 --
1193 -- StartProcess (PUBLIC)
1194 --   Begins execution of the process. The process will be identified by the
1195 --   itemtype and itemkey.  The engine locates the starting activities
1196 --   of the root process and executes them.
1197 -- IN
1198 --   itemtype - A valid item type
1199 --   itemkey  - A string generated from the application object's primary key.
1200 --
1201 /*#
1202  * Begins execution of the specified process. The engine locates the activity
1203  * marked as START and then executes it. CreateProcess() must first be called
1204  * to define the itemtype and itemkey before calling StartProcess().
1205  * @param itemtype Item Type
1206  * @param itemkey Item Key
1207  * @rep:scope public
1208  * @rep:lifecycle active
1209  * @rep:displayname Start Process
1210  * @rep:compatibility S
1211  * @rep:ihelp FND/@eng_api#a_startp See the related online help
1212  */
1213 procedure StartProcess(itemtype in varchar2,
1214                        itemkey  in varchar2);
1215 
1216 
1217 --
1218 -- LaunchProcess (PUBLIC)
1219 --   Launch a process both creates and starts it.
1220 --   This is a wrapper for friendlier UI
1221 -- IN
1222 --   itemtype - A valid item type
1223 --   itemkey  - A string generated from the application object's primary key.
1224 --   process  - A valid root process for this item type
1225 --              (or null to use the item's selector function)
1226 --   userkey - User key to be set
1227 --   owner - Role designated as owner of the item
1228 --
1229 /*#
1230  * Launches a specified process by creating the new runtime process and beginning
1231  * its execution. This is a wrapper that combines CreateProcess and StartProcess.
1232  * @param itemtype Item Type
1233  * @param itemkey Item Key
1234  * @param process Process Name
1235  * @param userkey User Key
1236  * @param owner Item Owner Role
1237  * @rep:scope public
1238  * @rep:lifecycle active
1239  * @rep:displayname Launch Process
1240  * @rep:compatibility S
1241  * @rep:ihelp FND/@eng_api#a_launchp See the related online help
1242  */
1243 procedure LaunchProcess(itemtype in varchar2,
1244                         itemkey  in varchar2,
1245                         process  in varchar2 default '',
1246                         userkey  in varchar2 default '',
1247                         owner    in varchar2 default '');
1248 
1249 
1250 
1251 --
1252 -- SuspendProcess (PUBLIC)
1253 --   Suspends process execution, meaning no new transitions will occur.
1257 --   suspended.
1254 --   Outstanding notifications will be allowed to complete, but they will not
1255 --   cause activity transitions. If the process argument is null, the root
1256 --   process for the item is suspended, otherwise the named process is
1258 -- IN
1259 --   itemtype - A valid item type
1260 --   itemkey  - A string generated from the application object's primary key.
1261 --   process  - Process to suspend, specified in the form
1262 --              [<parent process_name>:]<process instance_label>
1263 --              If null suspend the root process.
1264 --
1265 /*#
1266  * Suspends process execution so that no new transitions occur. Outstanding
1267  * notifications can complete by calling CompleteActivity(), but the workflow
1268  * does not transition to the next activity. Restart suspended processes by
1269  * calling ResumeProcess().
1270  * @param itemtype Item Type
1271  * @param itemkey Item Key
1272  * @param process Process Name
1273  * @rep:scope public
1274  * @rep:lifecycle active
1275  * @rep:displayname Suspend Process
1276  * @rep:compatibility S
1277  * @rep:ihelp FND/@eng_api#a_suspnp See the related online help
1278  */
1279 procedure SuspendProcess(itemtype in varchar2,
1280                          itemkey  in varchar2,
1281                          process  in varchar2 default '');
1282 
1283 
1284 --
1285 -- SuspendAll (PUBLIC)) --</rwunderl:1833759>
1286 --   Suspends all processes for a given itemType.
1287 -- IN
1288 --   itemtype - A valid itemType
1289 --   process
1290 --
1291 
1292 Procedure SuspendAll (p_itemType in varchar2,
1293                       p_process in varchar2 default NULL);
1294 
1295 --
1296 -- AbortProcess (PUBLIC)
1297 --   Abort process execution. Outstanding notifications are canceled. The
1298 --   process is then considered complete, with a status specified by the
1299 --   result argument.
1300 -- IN
1301 --   itemtype - A valid item type
1302 --   itemkey  - A string generated from the application object's primary key.
1303 --   process  - Process to abort, specified in the form
1304 --              [<parent process_name>:]<process instance_label>
1305 --              If null abort the root process.
1306 --   result   - Result to complete process with
1307 --   verify_lock - TRUE if the item should be locked before processing it
1308 --   cascade  - TRUE is you want to cascade purge all master-child
1309 --              relations associated with this item
1310 --
1311 /*#
1312  * Aborts process execution and cancels outstanding notifications. The process
1313  * status is considered COMPLETE, with a result specified by the <code>result</code>
1314  * argument. Also, any outstanding notifications or subprocesses are set to a status of
1315  * COMPLETE with a result of force, regardless of the <code>result</code> argument.
1316  * @param itemtype Item Type
1317  * @param itemkey Item Key
1318  * @param process Process Name
1319  * @param result Status of Aborted Process
1320  * @param verify_lock Lock Item Before Processing (TRUE/FALSE)
1321  * @param cascade Abort Associated Child Processes (TRUE/FALSE)
1322  * @rep:scope public
1323  * @rep:lifecycle active
1324  * @rep:displayname Abort Process
1325  * @rep:compatibility S
1326  * @rep:businessevent oracle.apps.wf.engine.abort
1327  * @rep:ihelp FND/@eng_api#a_abortp See the related online help
1328  */
1329 procedure AbortProcess(itemtype in varchar2,
1330                        itemkey  in varchar2,
1331                        process  in varchar2 default '',
1332                        result   in varchar2 default wf_engine.eng_force,
1333 		       verify_lock in boolean default FALSE,
1334 		       cascade  in boolean default FALSE);
1335 
1336 --
1337 -- ResumeProcess (PUBLIC)
1338 --   Returns a process to normal execution status. Any transitions which
1339 --   were deferred by SuspendProcess() will now be processed.
1340 -- IN
1341 --   itemtype   - A valid item type
1342 --   itemkey    - A string generated from the application object's primary key.
1343 --   process  - Process to resume, specified in the form
1344 --              [<parent process_name>:]<process instance_label>
1345 --              If null resume the root process.
1346 --
1347 /*#
1348  * Returns a suspended process to normal execution status. Any activities that
1349  * were transitioned to while the process was suspended are now executed.
1350  * @param itemtype Item Type
1351  * @param itemkey Item Key
1352  * @param process Process Name
1353  * @rep:scope public
1354  * @rep:lifecycle active
1355  * @rep:displayname Resume Process
1356  * @rep:compatibility S
1357  * @rep:ihelp FND/@eng_api#a_resump See the related online help
1358  */
1359 procedure ResumeProcess(itemtype in varchar2,
1360                         itemkey  in varchar2,
1361                         process  in varchar2 default '');
1362 
1363 
1364 --
1365 -- ResumeAll (PUBLIC) --</rwunderl:1833759>
1366 --   Resumes all processes for a given itemType.
1367 -- IN
1368 --   itemtype - A valid itemType
1369 --   process
1370 --
1371 Procedure ResumeAll (p_itemType in varchar2,
1372                      p_process  in varchar2 default NULL);
1373 
1374 
1375 --
1376 -- CreateForkProcess (PUBLIC)
1377 --   Performs equivalent of createprocess but for a forked process
1378 --   and copies all item attributes
1379 --   If same version is false, this is same as CreateProcess but copies
1380 --   item attributes as well.
1381 -- IN
1382 --   copy_itemtype  - Item type
1383 --   copy_itemkey   - item key to copy (will be stored to an item attribute)
1384 --   new_itemkey    - item key to create
1385 --   same_version   - TRUE will use same version even if out of date.
1386 --                    FALSE will use the active and current version
1387 /*#
1388  * Forks a runtime process by creating a new process that is a copy of the
1392  * new process. Then you must call StartForkProcess() to start the new process.
1389  * original. After calling CreateForkProcess(), you can call APIs such as
1390  * SetItemOwner(), SetItemUserKey(), or the SetItemAttribute APIs to reset
1391  * any item properties or modify any item attributes that you want for the
1393  * @param copy_itemtype Original Item Type
1394  * @param copy_itemkey Original Item Key
1395  * @param new_itemkey New Item Key
1396  * @param same_version Same version as original item
1397  * @param masterdetail Master-Detail Process
1398  * @rep:scope public
1399  * @rep:lifecycle active
1400  * @rep:displayname Create Fork Process
1401  * @rep:compatibility S
1402  * @rep:ihelp FND/@eng_api#a_crfork See the related online help
1403  */
1404 Procedure CreateForkProcess (
1405      copy_itemtype  in varchar2,
1406      copy_itemkey   in varchar2,
1407      new_itemkey    in varchar2,
1408      same_version   in boolean default TRUE,
1409      masterdetail   in boolean default NULL);
1410 
1411 --
1412 -- StartForkProcess (PUBLIC)
1413 --   Start a process that has been forked. Depending on the way this was forked,
1414 --   this will execute startprocess if its to start with the latest version or
1415 --   it copies the forked process activty by activity.
1416 -- IN
1417 --   itemtype  - Item type
1418 --   itemkey   - item key to start
1419 --
1420 /*#
1421  * Begins execution of the new forked process that you specify. Before you call
1422  * StartForkProcess(), you must first call CreateForkProcess() to create the
1423  * new process. You can modify the item attributes of the new process before
1424  * calling StartForkProcess().
1425  * @param itemtype Item Type
1426  * @param itemkey Item Key
1427  * @rep:scope public
1428  * @rep:lifecycle active
1429  * @rep:displayname Start Fork Process
1430  * @rep:compatibility S
1431  * @rep:ihelp FND/@eng_api#a_stfork See the related online help
1432  */
1433 procedure StartForkProcess(
1434      itemtype        in  varchar2,
1435      itemkey         in  varchar2);
1436 
1437 --
1438 -- BeginActivity (PUBLIC)
1439 --   Determines if the specified activity may currently be performed on the
1440 --   work item. This is a test that the performer may proactively determine
1441 --   that their intent to perform an activity on an item is, in fact, allowed.
1442 -- IN
1443 --   itemtype  - A valid item type
1444 --   itemkey   - A string generated from the application object's primary key.
1445 --   activity  - Completed activity, specified in the form
1446 --               [<parent process_name>:]<process instance_label>
1447 --
1448 /*#
1449  * Determines if the specified activity can currently be performed on the
1450  * process item and raises an exception if it cannot.
1451  * @param itemtype Item Type
1452  * @param itemkey Item Key
1453  * @param activity Activity Label to Begin
1454  * @rep:scope public
1455  * @rep:lifecycle active
1456  * @rep:displayname Begin Activity
1457  * @rep:compatibility S
1458  * @rep:ihelp FND/@eng_api#a_beginp See the related online help
1459  */
1460 procedure BeginActivity(itemtype in varchar2,
1461                         itemkey  in varchar2,
1462                         activity in varchar2);
1463 
1464 --
1465 -- CompleteActivity (PUBLIC)
1466 --   Notifies the workflow engine that an activity has been completed for a
1467 --   particular process(item). This procedure can have one or more of the
1468 --   following effects:
1469 --   o Creates a new item. If the completed activity is the start of a process,
1470 --     then a new item can be created by this call. If the completed activity
1471 --     is not the start of a process, it would be an invalid activity error.
1472 --   o Complete an activity with an optional result. This signals the
1473 --     workflow engine that an asynchronous activity has been completed.
1474 --     An optional activity completion result can also be passed.
1475 -- IN
1476 --   itemtype  - A valid item type
1477 --   itemkey   - A string generated from the application object's primary key.
1478 --   activity  - Completed activity, specified in the form
1479 --               [<parent process_name>:]<process instance_label>
1480 --   <result>  - An optional result.
1481 --
1482 /*#
1483  * Notifies the Workflow Engine that the specified activity has been completed
1484  * for a particular item. This procedure can be called either to indicate a
1485  * completed activity with an optional result or to create and start an item.
1486  * @param itemtype Item Type
1487  * @param itemkey Item Key
1488  * @param activity Activity Label to Complete
1489  * @param result Result
1490  * @param raise_engine_exception Raise Exception for Engine Issues
1491  * @rep:scope public
1492  * @rep:lifecycle active
1493  * @rep:displayname Complete Activity
1494  * @rep:compatibility S
1495  * @rep:ihelp FND/@eng_api#comact See the related online help
1496  */
1497 procedure CompleteActivity(itemtype in varchar2,
1498                            itemkey  in varchar2,
1499                            activity in varchar2,
1500                            result   in varchar2,
1501                            raise_engine_exception in boolean default FALSE);
1502 
1503 --
1504 -- CompleteActivityInternalName (PUBLIC)
1505 --   Identical to CompleteActivity, except that the internal name of
1506 --   completed activity is passed instead of the activity instance label.
1507 -- NOTES:
1508 -- 1. There must be exactly ONE instance of this activity with NOTIFIED
1509 --    status.
1510 -- 2. Using this api to start a new process is not supported.
1511 -- 3. Synchronous processes are not supported in this api.
1512 -- 4. This should only be used if for some reason the instance label is
1513 --    not known.  CompleteActivity should be used if the instance
1514 --    label is known.
1515 -- IN
1516 --   itemtype  - A valid item type
1520 --   <result>  - An optional result.
1517 --   itemkey   - A string generated from the application object's primary key.
1518 --   activity  - Internal name of completed activity, in the format
1519 --               [<parent process_name>:]<process activity_name>
1521 --
1522 /*#
1523  * Notifies the Workflow Engine that the specified activity has been completed
1524  * for a particular item. This procedure requires that the activity currently
1525  * has a status of 'Notified'. An optional activity completion result can also
1526  * be passed. The result can determine what transition the process takes next.
1527  * This API is similar to CompleteActivity() except that this API identifies the
1528  * activity to be completed by the activity's internal name, while
1529  * CompleteActivity() identifies the activity by the activity node label name.
1530  * @param itemtype Item Type
1531  * @param itemkey Item Key
1532  * @param activity Activity Label to Complete
1533  * @param result Result
1534  * @param raise_engine_exception Raise Exception for Engine Issues
1535  * @rep:scope public
1536  * @rep:lifecycle active
1537  * @rep:displayname Complete Activity Internal Name
1538  * @rep:compatibility S
1539  * @rep:ihelp FND/@eng_api#comactin See the related online help
1540  */
1541 procedure CompleteActivityInternalName(
1542   itemtype in varchar2,
1543   itemkey  in varchar2,
1544   activity in varchar2,
1545   result   in varchar2,
1546   raise_engine_exception in boolean default FALSE);
1547 
1548 --
1549 -- AssignActivity (PUBLIC)
1550 --   Assigns or re-assigns the user who will perform an activity. It may be
1551 --   called before the activity has been enabled(transitioned to). If a user
1552 --   is assigned to an activity that already has an outstanding notification,
1553 --   that notification will be canceled and a new notification will be
1554 --   generated for the new user.
1555 -- IN
1556 --   itemtype     - A valid item type
1557 --   itemkey      - A string generated from the application object's primary key.
1558 --   activity     - Activity to assign, specified in the form
1559 --                  [<parent process_name>:]<process instance_label>
1560 --   performer    - User who will perform this activity.
1561 --   reassignType - DELEGATE, TRANSFER or null
1562 --   ntfComments  - Comments while reassigning
1563 /*#
1564  * Assigns or reassigns an activity to another performer. This procedure may be
1565  * called before the activity is transitioned to. For example, a function
1566  * activity earlier in the process may determine the performer of a later
1567  * activity. If a new user is assigned to a notification activity that already
1568  * has an outstanding notification, the outstanding notification is canceled and
1569  * a new notification is generated for the new user by calling
1570  * WF_Notification.Transfer.
1571  * @param itemtype Item Type
1572  * @param itemkey Item Key
1573  * @param activity Activity Label
1574  * @param performer Performer Role
1575  * @param reassignType For Internal Use Only
1576  * @param ntfComments For Internal Use Only
1577  * @rep:scope public
1578  * @rep:lifecycle active
1579  * @rep:displayname Assign Performer to Activity
1580  * @rep:compatibility S
1581  * @rep:ihelp FND/@eng_api#a_assigp See the related online help
1582  */
1583 procedure AssignActivity(itemtype in varchar2,
1584                          itemkey  in varchar2,
1585                          activity in varchar2,
1586                          performer in varchar2,
1587                          reassignType in varchar2 default null,
1588                          ntfComments in varchar2 default null);
1589 
1590 --
1591 -- HandleError (PUBLIC)
1592 --   Reset the process thread to given activity and begin execution
1593 -- again from that point.  If command is:
1594 --     SKIP - mark the activity complete with given result and continue
1595 --     RETRY - re-execute the activity before continuing
1596 -- IN
1597 --   itemtype  - A valid item type.
1598 --   itemkey   - The item key of the process.
1599 --   activity  - Activity to reset, specified in the form
1600 --               [<parent process_name>:]<process instance_label>
1601 --   command   - SKIP or RETRY.
1602 --   <result>  - Activity result for the "SKIP" command.
1603 --
1604 /*#
1605  * Handles any process activity that has encountered an error, when
1606  * called from an activity in an ERROR process. You can also call this procedure
1607  * for any arbitrary activity in a process, to rollback part of your process to
1608  * that activity. The activity that you call this procedure with can have any
1609  * status and does not need to have been executed. The activity can also be in a
1610  * subprocess. If the activity node label is not unique within the process you
1611  * may precede the activity node label name with the internal name of its parent
1612  * process.
1613  * For example, <parent_process_internal_name>:<label_name>.
1614  * This procedure clears the activity specified and all activities following it
1615  * that have already been transitioned to by reexecuting each activity in
1616  * 'Cancel' mode. For an activity in the 'Error' state, there are no other
1617  * executed activities following it, so the procedure simply clears the errored
1618  * activity. Once the activities are cleared, this procedure resets any parent
1619  * processes of the specified activity to a status of 'Active', if they are not
1620  * already active. The procedure then handles the specified activity based on
1621  * the command you provide: SKIP or RETRY.
1622  * @param itemtype Item Type
1623  * @param itemkey Item Key
1624  * @param activity Activity Label to Handle
1625  * @param command Command (SKIP or RETRY)
1626  * @param result Result
1627  * @rep:scope public
1628  * @rep:lifecycle active
1629  * @rep:displayname Handle Error
1630  * @rep:compatibility S
1631  * @rep:businessevent oracle.apps.wf.engine.skip
1632  * @rep:businessevent oracle.apps.wf.engine.retry
1636                       itemkey  in varchar2,
1633  * @rep:ihelp FND/@eng_api#a_handp See the related online help
1634  */
1635 procedure HandleError(itemtype in varchar2,
1637                       activity in varchar2,
1638                       command  in varchar2,
1639                       result   in varchar2 default '');
1640 
1641 -- HandleErrorAll (PUBLIC)
1642 --   Reset the process thread to the given item type and/or item key.
1643 --   It only run in RETRY mode.
1644 -- IN
1645 --   itemtype  - A valid item type.
1646 --   itemkey   - The item key of the process.
1647 --   docommit  - True if you want a commit for every n iterations.
1648 --               n is defined as wf_engine.commit_frequency
1649 --
1650 procedure HandleErrorAll(itemtype in varchar2,
1651                          itemkey  in varchar2 default null,
1652                          activity in varchar2 default null,
1653                          command  in varchar2 default null,
1654                          result   in varchar2 default '',
1655                          docommit in boolean  default true);
1656 
1657 /*#
1658  * Returns the status and result for the root process of the specified item
1659  * instance. Possible values returned for the status are: ACTIVE, COMPLETE,
1660  * ERROR, or SUSPENDED. If the root process does not exist, then the item
1661  * key does not exist and will thus cause the procedure to raise an exception.
1662  * @param itemtype Item Type
1663  * @param itemkey Item Key
1664  * @param status Status
1665  * @param result Result
1666  * @rep:scope public
1667  * @rep:lifecycle active
1668  * @rep:displayname Item Status
1669  * @rep:compatibility S
1670  * @rep:ihelp FND/@eng_api#a_is See the related online help
1671  */
1672 procedure ItemStatus(itemtype in varchar2,
1673                      itemkey  in varchar2,
1674                      status   out NOCOPY varchar2,
1675                      result   out NOCOPY varchar2);
1676 
1677 procedure ItemInfo(itemtype      in  varchar2,
1678                    itemkey       in  varchar2,
1679                    status        out NOCOPY varchar2,
1680                    result        out NOCOPY varchar2,
1681                    actid         out NOCOPY number,
1682                    errname       out NOCOPY varchar2,
1683                    errmsg        out NOCOPY varchar2,
1684                    errstack      out NOCOPY varchar2);
1685 
1686 
1687 --
1688 -- Activity_Exist_In_Process
1689 --   ### OBSOLETE - Use FindActivity instead ###
1690 --
1691 function Activity_Exist_In_Process (
1692   p_item_type          in  varchar2,
1693   p_item_key           in  varchar2,
1694   p_activity_item_type in  varchar2 default null,
1695   p_activity_name      in  varchar2)
1696 return boolean;
1697 
1698 --
1699 -- Activity_Exist
1700 --   ### OBSOLETE - Use FindActivity instead ###
1701 --
1702 function Activity_Exist (
1703   p_process_item_type  in  varchar2,
1704   p_process_name       in  varchar2,
1705   p_activity_item_type in  varchar2 default null,
1706   p_activity_name      in  varchar2,
1707   active_date          in  date default sysdate,
1708   iteration            in  number default 0)
1709 return boolean;
1710 
1711 --
1712 -- EVENT activity related constants/functions
1713 --
1714 
1715 -- Activity types
1716 eng_event           varchar2(8) := 'EVENT';    -- Event activity
1717 
1718 -- Event directions
1719 eng_receive         varchar2(8) := 'RECEIVE'; -- Recieve incoming event
1720 eng_raise           varchar2(8) := 'RAISE';    -- Generate new event
1721 eng_send            varchar2(8) := 'SEND';    -- Transfer event
1722 
1723 -- Event activity attribute names
1724 eng_eventname       varchar2(30) := '#EVENTNAME';
1725 eng_eventkey        varchar2(30) := '#EVENTKEY';
1726 eng_eventmessage    varchar2(30) := '#EVENTMESSAGE';
1727 eng_eventoutagent   varchar2(30) := '#EVENTOUTAGENT';
1728 eng_eventtoagent    varchar2(30) := '#EVENTTOAGENT';
1729 eng_defaultevent    varchar2(30) := '#EVENTMESSAGE2';
1730 
1731 -- Send event activity attribute for OTA Callback
1732 eng_block_mode      varchar2(30)  := '#BLOCK_MODE';
1733 eng_cb_event_name   varchar2(240) := '#CB_EVENT_NAME';
1734 eng_cb_event_key    varchar2(2000):= '#CB_EVENT_KEY';
1735 
1736 --
1737 -- GetItemAttrClob (PUBLIC)
1738 --   Get display contents of item attribute as a clob
1739 -- NOTE
1740 --   Returns expanded content of attribute.
1741 --   For DOCUMENT-type attributes, this will be the actual document
1742 --   generated.  For all other types, this will be the displayed
1743 --   value of the attribute.
1744 --   Use GetItemAttrText to retrieve internal key.
1745 -- IN
1746 --   itemtype - item type
1747 --   itemkey - item key
1748 --   aname - item attribute name
1749 -- RETURNS
1750 --   Expanded content of item attribute as a clob
1751 --
1752 /*#
1753  * Returns the value of an item type attribute in a process as a character large
1754  * object (CLOB).
1755  * @param itemtype Item Type
1756  * @param itemkey Item Key
1757  * @param aname Attribute Name
1758  * @return Item Attribute Value as CLOB
1759  * @rep:scope public
1760  * @rep:lifecycle active
1761  * @rep:displayname Get Item Attribute Value as CLOB
1762  * @rep:compatibility S
1763  * @rep:ihelp FND/@eng_api#a_giac See the related online help
1764  */
1765 function GetItemAttrClob(
1766   itemtype in varchar2,
1767   itemkey in varchar2,
1768   aname in varchar2)
1769 return clob;
1770 
1771 --
1772 -- GetActivityAttrClob (PUBLIC)
1773 --   Get display contents of activity attribute as a clob
1774 -- NOTE
1775 --   Returns expanded content of attribute.
1776 --   For DOCUMENT-type attributes, this will be the actual document
1777 --   generated.  For all other types, this will be the displayed
1781 --   itemtype - item type
1778 --   value of the attribute.
1779 --   Use GetActivityAttrText to retrieve internal key.
1780 -- IN
1782 --   itemkey - item key
1783 --   aname - activity attribute name
1784 -- RETURNS
1785 --   Expanded content of activity attribute as a clob
1786 --
1787 /*#
1788  * Returns the value of an activity attribute in a process as a character large
1789  * object (CLOB).
1790  * @param itemtype Item Type
1791  * @param itemkey Item Key
1792  * @param actid Activity ID
1793  * @param aname Attribute Name
1794  * @return Activity Attribute Value as CLOB
1795  * @rep:scope public
1796  * @rep:lifecycle active
1797  * @rep:displayname Get Activity Attribute Value as CLOB
1798  * @rep:compatibility S
1799  * @rep:ihelp FND/@eng_api#a_getaac See the related online help
1800  */
1801 function GetActivityAttrClob(
1802   itemtype in varchar2,
1803   itemkey in varchar2,
1804   actid in number,
1805   aname in varchar2)
1806 return clob;
1807 
1808 --
1809 -- SetItemAttrEvent
1810 --   Set event-type item attribute
1811 -- IN
1812 --   itemtype - process item type
1813 --   itemkey - process item key
1814 --   name - attribute name
1815 --   event - attribute value
1816 --
1817 procedure SetItemAttrEvent(
1818   itemtype in varchar2,
1819   itemkey in varchar2,
1820   name in varchar2,
1821   event in wf_event_t);
1822 
1823 --
1824 -- GetItemAttrEvent
1825 --   Get event-type item attribute
1826 -- IN
1827 --   itemtype - process item type
1828 --   itemkey - process item key
1829 --   name - attribute name
1830 -- RETURNS
1831 --   Attribute value
1832 --
1833 function GetItemAttrEvent(
1834   itemtype in varchar2,
1835   itemkey in varchar2,
1836   name in varchar2)
1837 return wf_event_t;
1838 
1839 --
1840 -- GetActivityAttrEvent
1841 --   Get event-type activity attribute
1842 -- IN
1843 --   itemtype - process item type
1844 --   itemkey - process item key
1845 --   actid - current activity id
1846 --   name - attribute name
1847 -- RETURNS
1848 --   Attribute value
1849 --
1850 function GetActivityAttrEvent(
1851   itemtype in varchar2,
1852   itemkey in varchar2,
1853   actid in number,
1854   name in varchar2)
1855 return wf_event_t;
1856 
1857 --
1858 -- Event
1859 --   Signal event to workflow process
1860 -- IN
1861 --   itemtype - Item type of process
1862 --   itemkey - Item key of process
1863 --   process_name - Process to start (only if process not already running)
1864 --   event_message - Event message payload
1865 --
1866 /*#
1867  * Receives an event from the Business Event System into a workflow
1868  * process. If the specified item key already exists, the event is received into
1869  * that item. If the item key does not already exist, but the specified process
1870  * includes an eligible Receive event activity marked as a Start activity, the
1871  * Workflow Engine creates a new item running that process. Within the workflow
1872  * process that receives the event, the procedure searches for eligible Receive
1873  * event activities. An activity is only eligible to receive an event if its
1874  * event filter is either blank, set to an event group of which that event is a
1875  * member, or set to that particular event. Additionally, the activity must have
1876  * an appropriate status.
1877  * @param itemtype Item Type
1878  * @param itemkey Item Key
1879  * @param process_name Process Name
1880  * @param event_message Event Message
1881  * @rep:scope public
1882  * @rep:lifecycle active
1883  * @rep:displayname Event
1884  * @rep:compatibility S
1885  * @rep:ihelp FND/@eng_api#a_engevent See the related online help
1886  */
1887 procedure Event(
1888   itemtype in varchar2,
1889   itemkey in varchar2,
1890   process_name in varchar2 default null,
1891   event_message in wf_event_t);
1892 
1893 --
1894 -- Event2
1895 --   Signal event to workflow process
1896 -- IN
1897 --   event_message - Event message payload
1898 --
1899 procedure Event2(
1900   event_message in wf_event_t);
1901 
1902 --
1903 -- AddToItemAttrNumber
1904 --   Increments (or decrements) an numeric item attribute and returns the
1905 --   new value.  If the item attribute does not exist, it returns null.
1906 -- IN
1907 --   p_itemtype - process item type
1908 --   p_itemkey - process item key
1909 --   p_aname - Item Attribute Name
1910 --   p_name - attribute name
1911 --   p_addend - Numeric value to be added to the item attribute.
1912 --
1913 -- RETURNS
1914 --   Attribute value (NUMBER) or NULL if attribute does not exist.
1915 --
1916 function AddToItemAttrNumber(
1917   p_itemtype in varchar2,
1918   p_itemkey in varchar2,
1919   p_aname in varchar2,
1920   p_addend in number)
1921 return number;
1922 
1923 -- Bug 5903106
1924 -- HandleErrorConcurrent
1925 --   Concurrent Program API to handle any process activity that has
1926 --   encountered an error. This Concurrent Program API is a wrapper
1927 --   to HandleError and HandleErrorAll based on the parameter values
1928 --   supplied.
1929 -- IN
1930 --   p_errbuf
1931 --   p_retcode
1932 --   p_itemtype   - Workflow Itemtype
1933 --   p_itemkey    - Itemkey of the process
1934 --   p_activity   - Workflow process activity label
1935 --   p_start_date - Errored On or After date
1936 --   p_end_date   - Errored On or Before date
1937 --   p_max_retry  - Maximum retries allowed on an activity
1938 --   p_docommit   - True if you want a commit for every n iterations.
1939 --                  n is defined as wf_engine.commit_frequency
1940 --
1941 procedure HandleErrorConcurrent(p_errbuf    out nocopy varchar2,
1945                                 p_process   in  varchar2 default null,
1942                                 p_retcode   out nocopy varchar2,
1943                                 p_itemtype  in  varchar2,
1944                                 p_itemkey   in  varchar2 default null,
1946                                 p_activity  in  varchar2 default null,
1947                                 p_start_date in varchar2 default null,
1948                                 p_end_date  in  varchar2 default null,
1949                                 p_max_retry in  varchar2 default null,
1950                                 p_docommit  in  varchar2 default null);
1951 -- bug 6161171
1952 procedure AbortProcess2(itemtype    in varchar2,
1953                         itemkey     in varchar2,
1954                         process     in varchar2       default '',
1955                         result      in varchar2       default wf_engine.eng_force,
1956                         verify_lock in binary_integer default 0,
1957                         cascade     in binary_integer default 0);
1958 
1959 
1960 END WF_ENGINE;