1 package wf_bes_cleanup as
2 /* $Header: WFBESCUS.pls 120.1 2005/07/02 04:26:23 appldev noship $ */
3 /*#
4 * Cleans up the standard WF_CONTROL queue in the Business Event System
5 * by removing inactive subscribers from the queue.
6 * @rep:scope public
7 * @rep:product OWF
8 * @rep:displayname Workflow Control Queue Cleanup
9 * @rep:lifecycle active
10 * @rep:compatibility S
11 * @rep:category BUSINESS_ENTITY WF_EVENT
12 * @rep:ihelp FND/@besclnapi See the related online help
13 */
14
15 --------------------------------------------------------------------------------
16 -- Removes dead subscribers from the WF_CONTROL queue. This procedure will be
17 -- run periodically to remove subscribers which have died. This procedure:
18 -- 1. Checks to make sure that sufficient time has elapsed since the last time
19 -- it was run. If not, it just returns.
20 -- 2. Removes dead queue subscribers. A subscriber is assumed to be dead
21 -- if it has not responded to at least one ping.
22 -- 3. Sends out a new ping to the current subscribers.
23 --
24 -- errbuf - the error buffer
25 -- retcode - the return code
26 --------------------------------------------------------------------------------
27 /*#
28 * Performs cleanup for the standard WF_CONTROL queue. When a middle tier
29 * process for Oracle e-Business Suite or for standalone Oracle Workflow starts
30 * up, it creates a JMS subscriber to the WF_CONTROL queue. Then, when an event
31 * message is placed on the queue, a copy of the event message is created for
32 * each subscriber to the queue. If a middle tier process dies, however, the
33 * corresponding subscriber remains in the database. For more efficient
34 * processing, you should ensure that WF_CONTROL is periodically cleaned up by
35 * running Cleanup_Subscribers() to remove the subscribers for any middle tier
36 * processes that are no longer active.
37 * @param errbuf Return Error Message
38 * @param retcode Return Error Code
39 * @rep:scope public
40 * @rep:lifecycle active
41 * @rep:displayname Clean Up Inactive Subscribers
42 * @rep:compatibility S
43 * @rep:ihelp FND/@besclnapi#a_clnsub See the related online help
44 */
45 procedure cleanup_subscribers(errbuf out nocopy varchar2,
46 retcode out nocopy varchar2);
47
48 -------------------------------------------------------------------------------
49 -- Used by a subscriber to acknowledge receiving a ping.
50 --
51 -- ping_number - the ping number
52 -- queue_name - the queue name
53 -- subscriber_name - the subscriber name
54 --------------------------------------------------------------------------------
55 procedure acknowledge_ping(p_ping_number in number,
56 p_queue_name in varchar2,
57 p_subscriber_name in varchar2);
58
59 -------------------------------------------------------------------------------
60 -- Used to dequeue messages from exception queue
61 -- p_owner Owner of the queue whose exception message will be removed
62 -- p_queue_table queue table of the queue
63 --------------------------------------------------------------------------------
64 -- Purge JMS Queue
65
66 -- p_queue_name Queue name in format of owner.queue
67 -- p_consumer_name mandatary for multiple consumer queue. Default is null
68 -- p_correlation Optional to purge message with certain correlation. Default is null
69 -- p_commit_frequency how frequently the transaction should commit. Default is 100
70 procedure purge_jms_queue(p_queue_name in VARCHAR2,
71 p_consumer_name in VARCHAR2 default null,
72 p_correlation in VARCHAR2 default null,
73 p_commit_frequency in NUMBER default 100);
74
75 --------------------------------------------------------------------------------
76 -- Purge EVT Queue
77
78 -- p_queue_name Queue name in format of owner.queue
79 -- p_consumer_name mandatary for multiple consumer queue. Default is null
80 -- p_correlation Optional to purge message with certain correlation. Default is null
81 -- p_commit_frequency how frequently the transaction should commit. Default is 100
82 procedure purge_evt_queue(p_queue_name in VARCHAR2,
83 p_consumer_name in VARCHAR2 default null,
84 p_correlation in VARCHAR2 default null,
85 p_commit_frequency in NUMBER default 100);
86
87 end wf_bes_cleanup;