1 package WF_ITEM AUTHID CURRENT_USER as
2 /* $Header: wfengs.pls 120.8.12020000.2 2012/10/02 21:28:18 alsosa ship $ */
3 /*#
4 * The Workflow Item APIs can be called by an application program or a workflow
5 * function in the runtime phase to communicate with the engine and to change
6 * the status of each of the activities. These APIs are defined in a PL/SQL
7 * package called WF_ITEM.
8 * @rep:scope private
9 * @rep:product OWF
10 * @rep:displayname Workflow Item APIs
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 procedure ClearCache;
18
19 procedure Set_Item_Parent(itemtype in varchar2,
20 itemkey in varchar2,
21 parent_itemtype in varchar2,
22 parent_itemkey in varchar2,
23 parent_context in varchar2,
24 masterdetail in boolean default NULL);
25
26 --
27 -- SetItemOwner (PRIVATE)
28 -- Set the owner of an item
29 -- IN
30 -- itemtype - Item type
31 -- itemkey - Item key
32 -- owner - Role designated as owner of the item
33 --
34 procedure SetItemOwner(
35 itemtype in varchar2,
36 itemkey in varchar2,
37 owner in varchar2);
38
39 --
40 -- SetItemUserKey (PRIVATE)
41 -- Set the user key of an item
42 -- IN
43 -- itemtype - Item type
44 -- itemkey - Item key
45 -- userkey - User key to be set
46 --
47 procedure SetItemUserKey(
48 itemtype in varchar2,
49 itemkey in varchar2,
50 userkey in varchar2);
51
52 --
53 -- GetItemUserKey (PRIVATE)
54 -- Get the user key of an item
55 -- IN
56 -- itemtype - Item type
57 -- itemkey - Item key
58 -- RETURNS
59 -- User key of the item
60 --
61 function GetItemUserKey(
62 itemtype in varchar2,
63 itemkey in varchar2)
64 return varchar2;
65
66 function Item_Exist(itemtype in varchar2,
67 itemkey in varchar2)
68 return boolean;
69
70 procedure Root_Process(itemtype in varchar2,
71 itemkey in varchar2,
72 wflow out NOCOPY varchar2,
73 version out NOCOPY number);
74
75 procedure Create_Item(
76 itemtype in varchar2,
77 itemkey in varchar2,
78 wflow in varchar2,
79 actdate in date,
80 user_key in varchar2 default null,
81 owner_role in varchar2 default null);
82
83 function Active_Date(itemtype in varchar2,
84 itemkey in varchar2)
85 return date;
86
87 --Function Acquire_lock (PRIVATE)
88 --This function tries to lock the particular item (for the give
89 --itemtype/itemkey ) in the wf_items table. It returns true if the lock
90 --acquired else returns false.
91
92 function acquire_lock(itemtype in varchar2,
93 itemkey in varchar2,
94 raise_exception in boolean default false)
95 return boolean;
96
97 --
98 -- Attribute_On_Demand (PRIVATE)
99 -- Returns on demand status for the workitem
100 -- IN
101 -- itemtype - Item type
102 -- itemkey - Item key
103 -- Initialize cache if not already done then return c_ondemand;
104 --
105
106 function Attribute_On_Demand(
107 itemtype in varchar2,
108 itemkey in varchar2
109 ) return boolean;
110
111 --
112 -- SetEndDate (Private)
113 -- Sets end_date and completes any coordinated counter processing.
114 -- IN
115 -- p_itemtype - process item type
116 -- p_itemkey - process item key
117 -- RETURNS
118 -- number
119 -- NOTE:
120 -- This function will return a status of one of the following:
121 -- 0 - Item was found, active, and the end_date was set.
122 -- 1 - The item was not found. (ERROR)
123
124 function SetEndDate(p_itemtype in varchar2,
125 p_itemkey in varchar2) return number;
126
127 end WF_ITEM;