1 package WF_STANDARD as
2 /* $Header: wfstds.pls 120.2.12010000.1 2008/07/25 14:45:46 appldev ship $ */
3
4
5 -- AbortProcess
6 -- cover to wf_engine abort process used in error process.
7 procedure AbortProcess(itemtype in varchar2,
8 itemkey in varchar2,
9 actid in number,
10 funcmode in varchar2,
11 resultout in out nocopy varchar2);
12
13 -- OrJoin
14 -- Parallel Or Join.
15 -- Always returns 'NULL' result immediately, since an 'Or' succeeds
16 -- as soon as first in-transition activity completes.
17 -- IN
18 -- itemtype - item type
19 -- itemkey - item key
20 -- actid - process activity instance id
21 -- funcmode - execution mode
22 -- OUT
23 -- result - 'NULL'
24 procedure OrJoin(itemtype in varchar2,
25 itemkey in varchar2,
26 actid in number,
27 funcmode in varchar2,
28 resultout in out nocopy varchar2);
29
30 -- AndJoin
31 -- Parallel And Join
32 -- Returns 'NULL' if all in-transition activities have completed.
33 -- Returns 'WAITING' if at least one in-transition activity is not
34 -- complete, or is complete with the wrong result.
35 -- IN
36 -- itemtype - item type
37 -- itemkey - item key
38 -- actid - process activity instance id
39 -- funcmode - execution mode
40 -- OUT
41 -- result - 'WAITING' | 'NULL'
42 procedure AndJoin(itemtype in varchar2,
43 Itemkey in varchar2,
44 actid in number,
45 funcmode in varchar2,
46 resultout in out nocopy varchar2);
47
48 -- Assign
49 -- Assign value to an item attribute
50 -- IN
51 -- itemtype - item type
52 -- itemkey - item key
53 -- actid - process activity instance id
54 -- funcmode - execution mode
55 -- OUT
56 -- result - 'NULL'
57 -- ACTIVITY ATTRIBUTES REFERENCED
58 -- ATTR - Item attribute to set
59 -- DATE_VALUE - date value
60 -- NUMBER_VALUE - number value
61 -- TEXT_VALUE - text value
62 procedure Assign(itemtype in varchar2,
63 itemkey in varchar2,
64 actid in number,
65 funcmode in varchar2,
66 resultout in out nocopy varchar2);
67
68 -- Compare
69 -- Standard Compare function.
70 -- Compare two values and return TRUE/FALSE.
71 -- IN
72 -- itemtype - item type
73 -- itemkey - item key
74 -- actid - process activity instance id
75 -- funcmode - execution mode
76 -- OUT
77 -- comparison result (WFSTD_COMPARISON lookup code)
78 -- ACTIVITY ATTRIBUTES REFERENCED
79 -- VALUE1 - Item attribute reference
80 -- VALUE2 - Constant value of correct type
81 procedure Compare(itemtype in varchar2,
82 itemkey in varchar2,
83 actid in number,
84 funcmode in varchar2,
85 resultout in out nocopy varchar2);
86
87 -- CompareExecutionTime
88 -- Compare Execution Time function.
89 -- OUT
90 -- comparison value (LT, EQ, GT, NULL)
91 -- ACTIVITY ATTRIBUTES REFERENCED
92 -- EXECUTIONTIME - Execution time Test value in seconds
93 procedure CompareExecutionTime(itemtype in varchar2,
94 itemkey in varchar2,
95 actid in number,
96 funcmode in varchar2,
97 resultout in out nocopy varchar2);
98
99 -- CompareEventProperty
100 -- Compare a property on an event
101 -- IN
102 -- itemtype - item type
103 -- itemkey - item key
104 -- actid - process activity instance id
105 -- funcmode - execution mode
106 -- OUT
107 -- comparison result (WFSTD_COMPARISON lookup code)
108 -- GT LT EQ NULL
109 -- ACTIVITY ATTRIBUTES REFERENCED
110 -- VALUE1 - Event Property Reference (Based on the lookup of EVENTPROPERTY
111 -- VALUE2 - Constant value of correct type
112 procedure CompareEventProperty(itemtype in varchar2,
113 itemkey in varchar2,
114 actid in number,
115 funcmode in varchar2,
116 resultout in out nocopy varchar2);
117
118 -- SetEventProperty
119 -- Set the property in an Event to a given value
120 -- IN
121 -- itemtype - item type
122 -- itemkey - item key
123 -- actid - process activity instance id
124 -- funcmode - execution mode
125 -- OUT
126 -- NONE
127 -- ACTIVITY ATTRIBUTES REFERENCED
128 -- EVENT - Event whose property is to be compared
129 -- PROPERTY - Event Property Reference (Based on the lookup of EVENTPROPERTY
130 -- VALUE - Constant value of correct type
131 procedure SetEventProperty(itemtype in varchar2,
132 itemkey in varchar2,
133 actid in number,
134 funcmode in varchar2,
135 resultout in out nocopy varchar2);
136
137 -- GetEventProperty
138 -- Get a property of an Event and assign it to an Item Attribute
139 -- IN
140 -- itemtype - item type
141 -- itemkey - item key
142 -- actid - process activity instance id
143 -- funcmode - execution mode
144 -- OUT
145 -- NONE
146 -- ACTIVITY ATTRIBUTES REFERENCED
147 -- EVENT - Event whose property is to be compared
148 -- PROPERTY - Event Property Reference (Based on the lookup of EVENTPROPERTY
149 -- VALUE - Constant value of correct type
150 procedure GetEventProperty(itemtype in varchar2,
151 itemkey in varchar2,
152 actid in number,
153 funcmode in varchar2,
154 resultout in out nocopy varchar2);
155
156 -- LaunchProcess
157 -- launches a process
158 -- IN
159 -- itemtype - item type
160 -- itemkey - item key
161 -- actid - process activity instance id
162 -- funcmode - execution mode
163 -- OUT
164 -- result - NULL
165 -- ACTIVITY ATTRIBUTES REFERENCED
166 -- START_ITEMTYPE,START_ITEMKEY,START_PROCESS,START_USER_KEY,START_OWNER
167 procedure LaunchProcess
168 (itemtype in varchar2,
169 itemkey in varchar2,
170 actid in number,
171 funcmode in varchar2,
172 resultout in out nocopy varchar2);
173
174
175 -- LaunchProcess
176 -- Forks the item by creating a duplicate item with the same history.
177 -- The new forked item will be identical up to the point of this activity.
178 -- However this activity will be marked as NOTIFIED. It will be upto the user
179 -- to push it forward using CompleteActivity.
180 -- NOTE: this is not permitted for #SYNCH items.
181 -- IN
182 -- itemtype - item type
183 -- itemkey - item key
184 -- actid - process activity instance id
185 -- funcmode - execution mode
186 -- OUT
187 -- result - NULL
188 -- ACTIVITY ATTRIBUTES REFERENCED
189 -- NEW_ITEMKEY - the itemkey for the new item (required)
190 -- SAME_VERSION - TRUE creates a duplicate, FALSE uses the latest version
191 procedure ForkItem(itemtype in varchar2,
192 itemkey in varchar2,
193 actid in number,
194 funcmode in varchar2,
195 resultout in out nocopy varchar2);
196
197 -- Noop
198 -- Does nothing
199 -- IN
200 -- itemtype - item type
201 -- itemkey - item key
202 -- actid - process activity instance id
203 -- funcmode - execution mode
204 -- OUT
205 -- result - NULL
206 -- ACTIVITY ATTRIBUTES REFERENCED
207 -- none
208 procedure Noop(itemtype in varchar2,
209 itemkey in varchar2,
210 actid in number,
211 funcmode in varchar2,
212 resultout in out nocopy varchar2);
213
214 -- Notify
215 -- Public wrapper to engine notification call
216 -- the engine notification package will retrieve the activity attributes.
217 -- OUT
218 -- result - NULL
219 procedure Notify(itemtype in varchar2,
220 itemkey in varchar2,
221 actid in number,
222 funcmode in varchar2,
223 resultout in out nocopy varchar2);
224
225 -- Block
226 -- Stop and wait for external completion
227 -- IN
228 -- itemtype - item type
229 -- itemkey - item key
230 -- actid - process activity instance id
231 -- funcmode - execution mode
232 -- OUT
233 -- result - NOTIFIED
234 procedure Block(itemtype in varchar2,
235 itemkey in varchar2,
236 actid in number,
237 funcmode in varchar2,
238 resultout in out nocopy varchar2);
239
240 -- Block
241 -- Defers the thread by requesting a wait of zero seconds
242 -- OUT
243 -- result - DEFERRED:sysdate
244 procedure Defer(itemtype in varchar2,
245 itemkey in varchar2,
246 actid in number,
247 funcmode in varchar2,
248 resultout in out nocopy varchar2);
249
250 -- Wait
251 -- Wait until given date or elapsed time
252 -- IN
253 -- itemtype - item type
254 -- itemkey - item key
255 -- actid - process activity instance id
256 -- funcmode - execution mode
257 -- OUT
258 -- result - 'DEFERRED' or 'NULL'
259 -- 'DEFERRED' if this is the first call and wait is beginning
260 -- 'NULL' if this is the second call and wait period has completed
261 -- ACTIVITY ATTRIBUTES REFERENCED
262 -- WAIT_MODE - Lookup
263 -- 'ABSOLUTE' - Wait until date in WAIT_ABSOLUTE_DATE
264 -- 'RELATIVE' - Wait until time WAIT_RELATIVE_TIME after current date
265 -- 'DAY_OF_WEEK' - Wait until next occurrence of day of week
266 -- 'DAY_OF_MONTH' - Wait until next occurrence of day of month
267 -- WAIT_ABSOLUTE_DATE - Date
268 -- Date to wait until if WAIT_MODE = 'ABSOLUTE'
269 -- (Ignored if mode != 'ABSOLUTE')
270 -- WAIT_RELATIVE_TIME - Number (expressed in <days>.<fraction of days>)
271 -- Time to wait after current date if WAIT_MODE = 'RELATIVE'
272 -- (Ignored if mode != 'RELATIVE')
273 -- WAIT_DAY_OF_WEEK - Lookup
274 -- Next day of week (SUNDAY, MONDAY, etc) after current date
275 -- (Ignored if mode != 'DAY_OF_WEEK')
276 -- WAIT_DAY_OF_MONTH - Lookup
277 -- Next day of month (1, 2, ..., 31, LAST) after current date
278 -- (Ignored if mode != 'DAY_OF_MONTH');
279 -- WAIT_TIME - Date (format HH24:MI)
280 -- Time of day to complete activity. Valid for all wait modes.
281 -- If null default time to 00:00 (midnight), except RELATIVE mode.
282 -- For RELATIVE mode, if time is null then complete relative to current
283 -- date and time.
284 -- NOTE:
285 -- For all WAIT_MODEs, the completion day is determined by the attribute
286 -- associated with the mode, and the completion time by the WAIT_TIME
287 -- attribute.
288 -- For all modes except RELATIVE, the completion time is WAIT_TIME on
289 -- the day selected by the mode's attribute. If WAIT_TIME is null, the
290 -- default is 00:00 (midnight).
291 -- For RELATIVE mode, if WAIT_TIME is null the completion time is
292 -- figured relative to the current date and time. If WAIT_TIME is not
293 -- null the completion time is WAIT_TIME on the day selected regardless
294 -- of the current time.
295 --
296 procedure Wait(itemtype in varchar2,
297 itemkey in varchar2,
298 actid in number,
299 funcmode in varchar2,
300 resultout in out nocopy varchar2);
301
302 -- ResetError
303 -- Reset the status of an errored activity in an ERROR process.
304 -- IN
305 -- itemtype - item type
306 -- itemkey - item key
307 -- actid - process activity instance id
308 -- funcmode - execution mode
309 -- OUT
310 -- result - 'NULL'
311 -- ACTIVITY ATTRIBUTES REFERENCED
312 -- COMMAND - 'RETRY' or 'SKIP'
313 -- 'RETRY' clears the errored activity and runs it again
314 -- 'SKIP' marks the errored activity complete and continues processing
315 -- RESULT - Result code to complete the activity with if COMMAND = 'SKIP'
316 procedure ResetError(itemtype in varchar2,
317 itemkey in varchar2,
318 actid in number,
319 funcmode in varchar2,
320 resultout in out nocopy varchar2);
321
322
323
324 -- InitializeErrors
325 -- Called by the Error Process, this sets up various
326 -- item attributes.
327 -- IN
328 -- itemtype - item type
329 -- itemkey - item key
330 -- actid - process activity instance id
331 -- funcmode - execution mode
332 -- OUT
333 -- result - 'NULL'
334 PROCEDURE InitializeErrors( itemtype VARCHAR2,
335 itemkey VARCHAR2,
336 actid NUMBER,
337 funcmode VARCHAR2,
338 result OUT NOCOPY VARCHAR2 );
339
340
341 -- CheckErrorActive
342 -- Called by the Error Process, this check if errored activity
343 -- is still in error
344 -- Use this in an error process to exit out of a timeout loop
345 -- IN
346 -- itemtype - item type
347 -- itemkey - item key
348 -- actid - process activity instance id
349 -- funcmode - execution mode
350 -- OUT
351 -- result - T/F
352 PROCEDURE CheckErrorActive( itemtype IN VARCHAR2,
353 itemkey IN VARCHAR2,
354 actid IN NUMBER,
355 funcmode IN VARCHAR2,
356 result OUT NOCOPY VARCHAR2 );
357
358
359 -- RoleResolution
360 -- Resole A Role which comprises a group to an individual
361 -- IN
362 -- itemtype - item type
363 -- itemkey - item key
364 -- actid - process activity instance id
365 -- funcmode - execution mode
366 -- OUT
367 -- result - 'NULL'
368 -- ACTIVITY ATTRIBUTES REFERENCED
369 -- COMMAND - 'LOAD_BALANCE' or 'ROUND_ROBIN'
370 -- 'LOAD_BALANCE' Assigns to user with least open notifications
371 -- 'ROUND_ROBIN' Assigns notification to users sequencially
372 procedure RoleResolution(itemtype in varchar2,
373 itemkey in varchar2,
374 actid in number,
375 funcmode in varchar2,
376 resultout in out nocopy varchar2);
377
378 -- WaitForFlow
379 -- Wait for flow(Master or Detail) to complete
380 -- IN
381 -- itemtype - item type
382 -- itemkey - item key
383 -- actid - process activity instance id
384 -- funcmode - execution mode
385 -- OUT
386 -- result - 'NULL'
387 -- USED BY ACTIVITIES
388 --
389 -- WFSTD.WAITFORFLOW
393 -- CONTINUATION_FLOW - MASTER or DETAIL
390 --
391 -- ACTIVITY ATTRIBUTES REFERENCED
392 -- CONTINUATION_ACTIVITY - Name of Activity that must be complete to continue
394 -- - is Continuation Activity is in master or detail
395 procedure WaitForFlow( itemtype in varchar2,
396 itemkey in varchar2,
397 actid in number,
398 funcmode in varchar2,
399 resultout in out nocopy varchar2);
400
401 -- ContinueFlow
402 -- Signal Flow(Master or Detail ) to continue
403 -- IN
404 -- itemtype - item type
405 -- itemkey - item key
406 -- actid - process activity instance id
407 -- funcmode - execution mode
408 -- OUT
409 -- result - 'NULL'
410 -- USED BY ACTIVITIES
411 -- WFSTD.CONTINUEFLOW
412 --
413 -- ACTIVITY ATTRIBUTES REFERENCED
414 -- WAITING_ACTIVITY - Name of Activity that is waiting
415 -- WAITING_FLOW - MASTER or DETAIL
416 -- - is waiting activity is in a master or detail flow
417 procedure ContinueFlow( itemtype in varchar2,
418 itemkey in varchar2,
419 actid in number,
420 funcmode in varchar2,
421 resultout in out nocopy varchar2);
422
423 -- Loop Counter
424 -- Count the number of times the activity has been visited.
425 -- IN
426 -- itemtype - item type
427 -- itemkey - item key
428 -- actid - process activity instance id
429 -- funcmode - execution mode
430 -- OUT
431 -- result - WFSTD_LOOP_COUNTER loookup code
432 -- ACTIVITY ATTRIBUTES REFERENCED
433 -- MAX_TIMES
434 --
435 procedure LoopCounter( itemtype in varchar2,
436 itemkey in varchar2,
437 actid in number,
438 funcmode in varchar2,
439 resultout in out nocopy varchar2);
440
441 -- GetURL
442 -- Get monitor URL, store in item attribute
443 -- IN
444 -- itemtype - item type
445 -- itemkey - item key
446 -- actid - process activity instance id
447 -- funcmode - execution mode
448 -- OUT
449 -- result - 'NULL'
450 -- ACTIVITY ATTRIBUTES REFERENCED
451 -- ATTR - Item attribute to set
452 -- ADMIN_MODE - administration mode (Y / N)
453 procedure GetURL(itemtype in varchar2,
454 itemkey in varchar2,
455 actid in number,
456 funcmode in varchar2,
457 resultout in out nocopy varchar2);
458
459 -- VoteForResultType
460 -- Standard Voting Function
461 -- IN
462 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
463 -- itemkey - A string generated from the application object's primary key.
464 -- actid - The process activity(instance id).
465 -- funcmode - Run/Cancel
466 -- OUT
467 -- result -
468 -- ACTIVITY ATTRIBUTES REFERENCED
469 -- VOTING_OPTION
470 -- - WAIT_FOR_ALL_VOTES - Evaluate voting after all votes are cast
471 -- - or a Timeout condition closes the voting
472 -- - polls. When a Timeout occurs the
473 -- - voting percentages are calculated as a
474 -- - percentage ofvotes cast.
475 --
476 -- - REQUIRE_ALL_VOTES - Evaluate voting after all votes are cast.
477 -- - If a Timeout occurs and all votes have not
478 -- - been cast then the standard timeout
479 -- - transition is taken. Votes are calculated
480 -- - as a percenatage of users notified to vote.
481 --
482 -- - TALLY_ON_EVERY_VOTE - Evaluate voting after every vote or a
483 -- - Timeout condition closes the voting polls.
484 -- - After every vote voting percentages are
485 -- - calculated as a percentage of user notified
486 -- - to vote. After a timeout voting
487 -- - percentages are calculated as a percentage
488 -- - of votes cast.
489 --
490 -- "One attribute for each of the activities result type codes"
491 --
492 -- - The standard Activity VOTEFORRESULTTYPE has the WFSTD_YES_NO
493 -- - result type assigned.
494 -- - Thefore activity has two activity attributes.
495 --
496 -- Y - Percenatage required for Yes transition
497 -- N - Percentage required for No transition
498 --
499 procedure VoteForResultType( itemtype in varchar2,
500 itemkey in varchar2,
501 actid in number,
502 funcmode in varchar2,
503 resultout in out nocopy varchar2);
504 -- InitializeEventError
505 -- Called by the Error Process, this sets up various
506 -- item attributes.
507 -- IN
508 -- itemtype - item type
509 -- itemkey - item key
510 -- actid - process activity instance id
511 -- funcmode - execution mode
512 -- OUT
513 -- result - 'ERROR' or 'WARNING'
514 procedure InitializeEventError( itemtype in varchar2,
515 itemkey in varchar2,
516 actid in number,
517 funcmode in varchar2,
518 resultout out nocopy varchar2);
519 -- EventDetails
520 -- PL/SQL Document for Event Attributes
521 -- IN
522 -- document_id
523 -- display_type
524 -- document
525 -- document_type
526 procedure EventDetails ( document_id in varchar2,
527 display_type in varchar2,
528 document in out nocopy varchar2,
529 document_type in out nocopy varchar2);
530 -- RetryRaise
531 -- Called by the Error Process, raises event
532 -- IN
533 -- itemtype - item type
534 -- itemkey - item key
535 -- actid - process activity instance id
536 -- funcmode - execution mode
537 -- OUT
538 -- result - 'NULL'
539 procedure RetryRaise ( itemtype in varchar2,
540 itemkey in varchar2,
541 actid in number,
542 funcmode in varchar2,
543 resultout out nocopy varchar2);
544 -- GetAgents
545 -- Gets the Event Subscription Out and To Agent
546 -- IN
547 -- itemtype - item type
548 -- itemkey - item key
549 -- actid - process activity instance id
550 -- funcmode - execution mode
551 -- OUT
552 -- result - 'TRUE' and 'FALSE'
553 procedure GetAgents ( itemtype in varchar2,
554 itemkey in varchar2,
555 actid in number,
556 funcmode in varchar2,
557 resultout out nocopy varchar2);
558 -- GetAckAgent
559 -- Gets the Acknowledge To Agent based on the Event Message
560 -- IN
561 -- itemtype - item type
562 -- itemkey - item key
563 -- actid - process activity instance id
564 -- funcmode - execution mode
565 -- OUT
566 -- result - 'NULL'
567 procedure GetAckAgent ( itemtype in varchar2,
568 itemkey in varchar2,
569 actid in number,
570 funcmode in varchar2,
571 resultout out nocopy varchar2);
572
573 -- SubscriptionDetails
574 -- PL/SQL Document to display subscription parameter details
575 -- IN
576 -- document_id
577 -- display_type
578 -- document
579 -- document_type
580 procedure SubscriptionDetails (document_id in varchar2,
581 display_type in varchar2,
582 document in out nocopy varchar2,
583 document_type in out nocopy varchar2);
584
585 -- ErrorDetails
586 -- PL/SQL Document to display event error details
587 -- IN
588 -- document_id
589 -- display_type
590 -- document
591 -- document_type
592 procedure ErrorDetails (document_id in varchar2,
593 display_type in varchar2,
594 document in out nocopy varchar2,
595 document_type in out nocopy varchar2);
596
597 -- Is_WS_Subscription
598 -- Checks if the current subscription's Action Type is INVOKE_WS_RG
599 procedure SubscriptionAction(itemtype in varchar2,
600 itemkey in varchar2,
601 actid in number,
602 funcmode in varchar2,
603 resultout in out nocopy varchar2);
604
605 END WF_STANDARD;