DBA Data[Home] [Help]

PACKAGE: APPS.IEX_STRATEGY_WF

Source


1 PACKAGE IEX_STRATEGY_WF AUTHID CURRENT_USER as
2 /* $Header: iexstrws.pls 120.6.12010000.3 2009/01/15 22:24:43 ehuh ship $ */
3 
4 
5 --jsanju 05/30/02
6 -- Table Of Competence Ids.
7 TYPE   tab_of_comp_id is TABLE of NUMBER
8 INDEX BY BINARY_INTEGER;
9 
10 /**
11  * aborting workflow
12  * ..
13  **/
14 procedure custom_abort_process(p_itemtype IN varchar2, p_itemkey IN varchar2);
15 /**
16  * check to see if there are any pending
17  * work items to be processed
18  **/
19 procedure check_work_items_completed(
20                                       itemtype    in   varchar2,
21                                       itemkey     in   varchar2,
22                                       actid       in   number,
23                                       funcmode    in   varchar2,
24                                       result      out NOCOPY  varchar2);
25 
26 /**
27  * Close all the pending work items
28  * and close the strategy
29  * if the update fails , go and wait
30  * for the signal again
31  **/
32 
33 procedure close_strategy(
34                          itemtype    in   varchar2,
35                          itemkey     in   varchar2,
36                          actid       in   number,
37                          funcmode    in   varchar2,
38                          result      out NOCOPY  varchar2);
39 
40 /**
41  * Get the next work item for the strategy
42  * creates the work item in strategy_work_items table
43  * update the attribute work_item_id in the workflow with the
44  * create workitem_id.
45  **/
46 
47 procedure create_next_work_item(
48                              itemtype    in   varchar2,
49                              itemkey     in   varchar2,
50                              actid       in   number,
51                              funcmode    in   varchar2,
52                              result      out NOCOPY  varchar2);
53 
54 /**
55  * This will suspend the existing process
56  **/
57 procedure wait_signal(
58                          itemtype    in   varchar2,
59                          itemkey     in   varchar2,
60                          actid       in   number,
61                          funcmode    in   varchar2,
62                          result      out NOCOPY  varchar2);
63 
64 
65 procedure wait_complete_signal(
66                          itemtype    in   varchar2,
67                          itemkey     in   varchar2,
68                          actid       in   number,
69                          funcmode    in   varchar2,
70                          result      out  NOCOPY varchar2) ;
71 
72 --get the status of the process
73 -- to see if the process is SUSPEND(wf_engine.eng_suspended )
74 PROCEDURE process_status (  p_process     in   varchar2 ,
75                             p_itemtype    in   varchar2,
76                             p_itemkey     in   varchar2,
77                             x_status      out NOCOPY  varchar2);
78 
79 /**
80  * This will be called from the form or the concurrent program
81  * once the work item
82  * status is changed or if the strategy is closed or cancelled
83  * if the work item is null ,then the strategy and the pending
84  * work items are to be closed/cancelled
85  * else just complete or cancel the work item only
86  *03/19/02
87  * --sub process addition --
88  * if it is waiting for optional check or escalte check
89  * then we have not reached the wait for response activity
90  * or the process is not suspended so these are the things we should do
91  * 1.DO NOT resume process
92  * 2.Complete activity (depending on the activity label - this will be
93  * either escalte_check or optional_check)
94  * then the subprocess will be completed
95  *04/02/2002
96  * add a new parameter signal_source for custom work flow and fulfilment
97  *work flow check if the agent has already changed the work item status
98  *before the completion of custom or fulfillment wf's.then do nothing ,
99  *else update workitem and resume process
100  **/
101 
102 procedure send_signal(
103                          process       in   varchar2 ,
104                          strategy_id   in   varchar2,
105                          status        in   VARCHAR2,
106                          work_item_id  in number DEFAULT NULL,
107                          signal_source in varchar2 DEFAULT NULL);
108 
109 
110 /**
111  * check whether the work item is optional or not
112  **/
113 procedure OPTIONAL_CHECK(
114                          itemtype    in   varchar2,
115                          itemkey     in   varchar2,
116                          actid       in   number,
117                          funcmode    in   varchar2,
118                          result      out NOCOPY  varchar2);
119 
120 /**
121  * check whether the work item should be escalated or not
122  **/
123 procedure ESCALATE_CHECK(
124                          itemtype    in   varchar2,
125                          itemkey     in   varchar2,
126                          actid       in   number,
127                          funcmode    in   varchar2,
128                          result      out NOCOPY  varchar2);
129 
130 /**
131  * check whether the work item status is on hold
132  **/
133 procedure ONHOLD_CHECK(
134                          itemtype    in   varchar2,
135                          itemkey     in   varchar2,
136                          actid       in   number,
137                          funcmode    in   varchar2,
138                          result      out NOCOPY  varchar2);
139 
140 /**
141  * check whether the fulfil_temp_id is populated for this work item
142  *
143  **/
144 procedure FULFIL_CHECK(
145                          itemtype    in   varchar2,
146                          itemkey     in   varchar2,
147                          actid       in   number,
148                          funcmode    in   varchar2,
149                          result      out NOCOPY  varchar2);
150 
151 
152 procedure cal_post_wait(
153                          itemtype    in   varchar2,
154                          itemkey     in   varchar2,
155                          actid       in   number,
156                          funcmode    in   varchar2,
157                          result      out  NOCOPY varchar2);
158 
159 procedure cal_pre_wait(
160                          itemtype    in   varchar2,
161                          itemkey     in   varchar2,
162                          actid       in   number,
163                          funcmode    in   varchar2,
164                          result      out  NOCOPY varchar2);
165 
166 /* begin bug 4141678 by ctlee 3/14/2005 - loop one when create workitem failed */
167 procedure wi_failed_first_time(
168                          itemtype    in   varchar2,
169                          itemkey     in   varchar2,
170                          actid       in   number,
171                          funcmode    in   varchar2,
172                          result      out nocopy  varchar2);
173 /* end bug 4141678 by ctlee 3/14/2005 - loop one when create workitem failed */
174 
175 /**
176  * check whether the to send a notification
177  **/
178 procedure NOTIFY_CHECK(
179                          itemtype    in   varchar2,
180                          itemkey     in   varchar2,
181                          actid       in   number,
182                          funcmode    in   varchar2,
183                          result      out NOCOPY  varchar2);
184 
185 /**
186  * check whether there is a custom worlflow attached
187  **/
188 procedure CUSTOM_CHECK(
189                          itemtype    in   varchar2,
190                          itemkey     in   varchar2,
191                          actid       in   number,
192                          funcmode    in   varchar2,
193                          result      out NOCOPY  varchar2);
194 
195 /**
196  * updatework item to Timeout
197  **/
198 procedure UPDATE_WORK_ITEM(
199                          itemtype    in   varchar2,
200                          itemkey     in   varchar2,
201                          actid       in   number,
202                          funcmode    in   varchar2,
203                          result      out NOCOPY  varchar2);
204 
205 
206 procedure WAIT_OPTIONAL(
207                          itemtype    in   varchar2,
208                          itemkey     in   varchar2,
209                          actid       in   number,
210                          funcmode    in   varchar2,
211                          result      out NOCOPY  varchar2) ;
212 
213 procedure WAIT_ESCALATION(
214                          itemtype    in   varchar2,
215                          itemkey     in   varchar2,
216                          actid       in   number,
217                          funcmode    in   varchar2,
218                          result      out NOCOPY  varchar2);
219 
220 
221 procedure WAIT_STRATEGY(
222                          itemtype    in   varchar2,
223                          itemkey     in   varchar2,
224                          actid       in   number,
225                          funcmode    in   varchar2,
226                          result      out NOCOPY  varchar2);
227 
228 --get messages from server side
229 PROCEDURE Get_Messages (
230 p_message_count IN  NUMBER,
231 x_msgs          OUT NOCOPY VARCHAR2);
232 ----------------------------------------------
233 --if work item creation fails ,
234 --and if adminstartor does not want to continue
235 --replies via email 'NO' then close strategy and
236 --complete the workflow.
237 --set the status attribute to 'CANCELLED'
238 -- when closing strategy(CLOSE_STRATEGY procedure)
239 -- this attribute is checked.
240 --05/02/02
241 
242 procedure SET_STRATEGY_STATUS(
243                          itemtype    in   varchar2,
244                          itemkey     in   varchar2,
245                          actid       in   number,
246                          funcmode    in   varchar2,
247                          result      out NOCOPY  varchar2);
248 
249 --set user_id,responsibility_id
250 --and application responsibility id
251 --which will then used by the the an other activity
252 -- which comes after a deferred activitiy
253 --08/02/02
254 
255 procedure SET_SESSION_CTX(
256                          itemtype    in   varchar2,
257                          itemkey     in   varchar2,
258                          actid       in   number,
259                          funcmode    in   varchar2,
260                          result      out NOCOPY  varchar2);
261 
262 
263 
264 
265 /**
266  --07/31/02
267  --abort the strategy workflow
268  --update the work items,
269  --close or cancel strategy
270  --abort all the custom workflows
271  --this will happen if the workflow failed before
272  --being suspended, for example if notification
273  -- does not have a performer.
274 
275 **/
276 procedure  CLOSE_AND_ABORT_STRATEGY_WF(
277                            l_strategy_id   in   NUMBER,
278                            l_status        in  VARCHAR2 ) ;
279 
280 
281 -- Begin- Andre 07/28/2004 - Add bill to assignmnet
282 
283 ------------------- procedure get_billto_resource ------------------------------
284 /** get resource id for the given competence and bill to address
285 *
286 **/
287 function get_billto_resource ( p_siteuse_id      IN NUMBER,
288                          p_competence_tab IN tab_of_comp_id,
289                          x_resource_id   OUT NOCOPY NUMBER)
290 						 RETURN BOOLEAN;
291 
292 -- End- Andre 07/28/2004 - Add bill to assignmnet
293 
294 -- Begin- Kasreeni 01/07/2005 - Add account assignmnet
295 
296 ------------------- procedure get_billto_resource ------------------------------
297 /** get resource id for the given competence and account
298 *
299 **/
300 function get_account_resource ( p_account_id      IN NUMBER,
301                          p_competence_tab IN tab_of_comp_id,
302                          x_resource_id   OUT NOCOPY NUMBER)
303 						 RETURN BOOLEAN;
304 
305 -- End- kasreeni 07/28/2004 - Add account assignmnet
306 
307 
308 --Begin - schekuri - 03-Dec-2005 - Bug#4506922
309 --to make the wf wait when the status of strategy is ONHOLD
310 procedure wait_on_hold_signal(
311                          itemtype    in   varchar2,
312                          itemkey     in   varchar2,
313                          actid       in   number,
314                          funcmode    in   varchar2,
315                          result      out  NOCOPY varchar2) ;
316 --End - schekuri -  03-Dec-2005 - Bug#4506922
317 
318 
319 --Begin - schekuri - 06-Dec-2005 - Bug#4506922
320 -- procedure to update the workitem to open
321 procedure update_work_item_to_open(
322                          itemtype    in   varchar2,
323                          itemkey     in   varchar2,
324                          actid       in   number,
325                          funcmode    in   varchar2,
326                          result      out  NOCOPY varchar2) ;
327 --End - schekuri - 06-Dec-2005 - Bug#4506922
328 
329 /**
330  * update Escalation flag of the workitem
331  **/
332 procedure UPDATE_ESC_FLAG(
333                          itemtype    in   varchar2,
334                          itemkey     in   varchar2,
335                          actid       in   number,
336                          funcmode    in   varchar2,
337                          result      out NOCOPY  varchar2);
338 
339 
340 end IEX_STRATEGY_WF;