DBA Data[Home] [Help]

PACKAGE: APPS.AMV_WFAPPROVAL_PVT

Source


1 PACKAGE amv_wfapproval_pvt as
2 /* $Header: amvvwfas.pls 120.1 2005/06/30 13:37:09 appldev ship $ */
3 
4 --
5 -- Procedure
6 --	StartProcess
7 --
8 -- Description
9 --      Initiate workflow for a requisition
10 -- IN
11 --   RequestorId	- PK of requestor, Item owner or Subscriber
12 --   RequestorName	- Name of Item owner or Subscriber
13 --   ItemId		- Id of Item published
14 --   ItemName		- Item document
15 --   ChannelId  	- PK of Channek
16 --   ChannelName  	- Name Channel of the channel
17 --   ProcessOwner 	- Requisition Process Owner Username from calling appl
18 --   Workflowprocess    - Workflow process to run.
19 --
20 PROCEDURE StartProcess(	RequestorId		in number,
21 			ItemId			in number default null,
22 			ChannelId		in number,
23                         Timeout                 in number default null,
24 			ProcessOwner		in varchar2,
25 			Workflowprocess		in varchar2,
26                         Item_Type               in varchar2 default null);
27 --------------------------------------------------------------------------------
28 --------------------------------------------------------------------------------
29 --
30 -- Procedure
31 --	Is_ChannelApprover
32 --
33 -- Description
34 --	 Check if the User is an approver for the channel
35 -- IN
36 --	channel_id
37 --	user_id
38 --
39 -- Returns
40 --    TRUE  -  If User has privilege to approve channel
41 --    FALSE -  If User does not have the privilege to approve channel
42 --
43 FUNCTION Is_ChannelApprover ( 	channel_id in number,
44 				user_id in number ) return boolean;
45 --------------------------------------------------------------------------------
46 --------------------------------------------------------------------------------
47 --
48 -- Procedure
49 --	Can_Publish
50 --
51 --   Workflow cover: Check if the user can publish a document in the channel
52 -- IN
53 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
54 --   itemkey   - A string generated from the application object's primary key.
55 --   actid     - The function activity(instance id).
56 --   funcmode  - Run/Cancel/Timeout
57 -- OUT
58 --   Resultout    - 'COMPLETE:Y' IF user can subscribe without approval
59 --		  - 'COMPLETE:N' IF user cannot subscribe without approval
60 --
61 -- USED BY ACTIVITIES
62 --  <ITEM_TYPE> 	<ACTIVITY>
63 --  AMV_APPROVAL_PVT   	AMV_CAN_SUBSCRIBE
64 --
65 --
66 PROCEDURE Can_Publish ( 	itemtype	in varchar2,
67 				itemkey  	in varchar2,
68 				actid		in number,
69 				funcmode	in varchar2,
70 				resultout	OUT NOCOPY varchar2	);
71 --------------------------------------------------------------------------------
72 --------------------------------------------------------------------------------
73 --
74 -- Procedure
75 --	Can_Subscribe
76 --
77 --   Workflow cover: Check if user can subscribe to a channel without approval
78 -- IN
79 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
80 --   itemkey   - A string generated from the application object's primary key.
81 --   actid     - The function activity(instance id).
82 --   funcmode  - Run/Cancel/Timeout
83 -- OUT
84 --   Resultout    - 'COMPLETE:Y' IF user can subscribe without approval
85 --		  - 'COMPLETE:N' IF user cannot subscribe without approval
86 --
87 -- USED BY ACTIVITIES
88 --  <ITEM_TYPE> 	<ACTIVITY>
89 --  AMV_APPROVAL_PVT   	AMV_CAN_SUBSCRIBE
90 --
91 --
92 PROCEDURE Can_Subscribe ( 	itemtype	in varchar2,
93 				itemkey  	in varchar2,
94 				actid		in number,
95 				funcmode	in varchar2,
96 				resultout	OUT NOCOPY varchar2	);
97 --------------------------------------------------------------------------------
98 --------------------------------------------------------------------------------
99 --
100 -- Procedure
101 --	GetApprover
102 --
103 -- Description
104 --	Select an Approver
105 -- IN
106 --	channel
107 --	approver type
108 -- Out
109 --      approver
110 --
111 PROCEDURE GetApprover (channel_id 	in number,
112 		       approver_in_type in varchar2,
113 		       approver_out_type OUT NOCOPY varchar2,
114 		       approvers 	OUT NOCOPY varchar2 );
115 --------------------------------------------------------------------------------
116 --------------------------------------------------------------------------------
117 --
118 --
119 -- Select_Approver
120 --
121 --
122 -- Select_Approver
123 --   Workflow cover: Select a channel approver and set Workflow item attributes
124 -- IN
125 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
126 --   itemkey   - A string generated from the application object's primary key.
127 --   actid     - The function activity(instance id).
128 --   funcmode  - Run/Cancel/Timeout
129 -- OUT
130 --   Resultout    - 'COMPLETE:T' IF channel has approver
131 --		  - 'COMPLETE:F' IF channel does not any more approver
132 --
133 -- USED BY ACTIVITIES
134 --  <ITEM_TYPE> 	<ACTIVITY>
135 --  AMV_APPROVAL_PVT   	AMV_SELECT_APPROVER
136 --
137 PROCEDURE Select_Approver ( 	itemtype	in varchar2,
138 				itemkey  	in varchar2,
139 				actid		in number,
140 				funcmode	in varchar2,
141 				resultout	OUT NOCOPY varchar2	);
142 --------------------------------------------------------------------------------
143 --------------------------------------------------------------------------------
144 --
145 -- Notification_Results
146 --
147 --
148 -- Notification_Results
149 --   Workflow cover: End the notification process based on the result
150 -- IN
151 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
152 --   itemkey   - A string generated from the application object's primary key.
153 --   actid     - The function activity(instance id).
154 --   funcmode  - Run/Cancel/Timeout
155 -- OUT
156 --
157 -- USED BY ACTIVITIES
158 --  <ITEM_TYPE>         <ACTIVITY>
159 --  AMV_APPROVAL_PVT    AMV_NTF_APPROVAL
160 --
161 PROCEDURE Notification_Results (itemtype        in varchar2,
162                                 itemkey         in varchar2,
163                                 actid           in number,
164                                 funcmode        in varchar2,
165                                 resultout       OUT NOCOPY varchar2    );
166 --------------------------------------------------------------------------------
167 --------------------------------------------------------------------------------
168 --
169 -- Procedure
170 --	Approve_Item
171 --
172 -- Description - Approve an item for channel
173 --
174 -- IN
175 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
176 --   itemkey   - A string generated from the application object's primary key.
177 --   itemuserkey - A string generated from the application object user-friendly
178 --               primary key.
179 --   actid     - The function activity(instance id).
180 --   processowner - The username owner for this item instance.
181 --   funcmode  - Run/Cancel/Timeout
182 -- OUT
183 --   resultout    - Name of workflow process to run
184 --
185 -- USED BY ACTIVITIES
186 --  <ITEM_TYPE> 	<ACTIVITY>
187 --  AMV_APPROVAL_PVT   	AMV_APPROVE_ITEM
188 --
189 PROCEDURE Approve_Item (	itemtype	in varchar2,
190 			itemkey  	in varchar2,
191 			actid		in number,
192 			funcmode	in varchar2,
193 			resultout	OUT NOCOPY varchar2	);
194 --------------------------------------------------------------------------------
195 --------------------------------------------------------------------------------
196 --
197 -- Procedure
198 --	Approve_Subscription
199 --
200 -- Description -  Subscribe a user to a channel
201 --
202 -- IN
203 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
204 --   itemkey   - A string generated from the application object's primary key.
205 --   itemuserkey - A string generated from the application object user-friendly
206 --               primary key.
207 --   actid     - The function activity(instance id).
208 --   processowner - The username owner for this item instance.
209 --   funcmode  - Run/Cancel
210 -- OUT
211 --   resultout    - Name of workflow process to run
212 --
213 -- USED BY ACTIVITIES
214 --  <ITEM_TYPE> 	<ACTIVITY>
215 --   AMV_APPROVAL_PVT   AMV_APPROVE_SUBSCRIPTON
216 --
217 PROCEDURE Approve_Subscription (itemtype	in varchar2,
218 			itemkey  	in varchar2,
219 			actid		in number,
220 			funcmode	in varchar2,
221 			resultout	OUT NOCOPY varchar2	);
222 --------------------------------------------------------------------------------
223 --------------------------------------------------------------------------------
224 --
225 -- Procedure
226 --	Reject_Item
227 --
228 -- Description - Reject an item for a channel
229 --
230 -- IN
231 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
232 --   itemkey   - A string generated from the application object's primary key.
233 --   itemuserkey - A string generated from the application object user-friendly
234 --               primary key.
235 --   actid     - The function activity(instance id).
236 --   processowner - The username owner for this item instance.
237 --   funcmode  - Run/Cancel
238 -- OUT
239 --   resultout    - Name of workflow process to run
240 --
241 -- USED BY ACTIVITIES
242 --  <ITEM_TYPE> 	<ACTIVITY>
243 --  AMV_APPROVAL_PVT   	AMV_REJECT_ITEM
244 --
245 PROCEDURE Reject_Item (	itemtype	in varchar2,
246 			itemkey  	in varchar2,
247 			actid		in number,
248 			funcmode	in varchar2,
249 			resultout	OUT NOCOPY varchar2	);
250 --------------------------------------------------------------------------------
251 --------------------------------------------------------------------------------
252 END amv_wfapproval_pvt;