1 package wf_bes_cleanup AUTHID CURRENT_USER as
2 /* $Header: WFBESCUS.pls 120.1.12010000.2 2009/08/16 14:06:23 skandepu ship $ */
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 starts up, it creates a JMS subscriber
30 * to the WF_CONTROL queue. Then, when an event message is placed on the
31 * queue, a copy of the event message is created for each subscriber to
32 * the queue. If a middle tier process dies, however, the corresponding
33 * subscriber remains in the database. For more efficient processing,
34 * 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
71 /*#
72 * Purges messages from a queue that uses the SYS.AQ$_JMS_TEXT_MESSAGE datatype
73 * as its payload type. For a multi-consumer queue, you must specify
74 * the consumer associated with the messages to purge. You can optionally
75 * specify a correlation ID to purge only messages marked with that ID.
76 * @param p_queue_name The queue name.
77 * @param p_consumer_name The consumer name for the messages to purge.
78 * @param p_correlation The correlation ID for the messages to purge.
79 * @param p_commit_frequency The number of messages to purge before committing.
80 * @rep:scope public
81 * @rep:lifecycle active
82 * @rep:displayname Purge JMS Queue
83 * @rep:compatibility S
84 */
85 procedure purge_jms_queue(p_queue_name in VARCHAR2,
86 p_consumer_name in VARCHAR2 default null,
87 p_correlation in VARCHAR2 default null,
88 p_commit_frequency in NUMBER default 100);
89
90 --------------------------------------------------------------------------------
91 -- Purge EVT Queue
92
93 -- p_queue_name Queue name in format of owner.queue
94 -- p_consumer_name mandatary for multiple consumer queue. Default is null
95 -- p_correlation Optional to purge message with certain correlation. Default is null
96 -- p_commit_frequency how frequently the transaction should commit. Default is 100
97
98 /*#
99 * Purges messages from a queue that uses the WF_EVENT_T datatype
100 * as its payload type. For a multi-consumer queue, you must specify
101 * the consumer associated with the messages to purge. You can optionally
102 * specify a correlation ID to purge only messages marked with that ID.
103 * @param p_queue_name The queue name.
104 * @param p_consumer_name The consumer name for the messages to purge.
105 * @param p_correlation The correlation ID for the messages to purge.
106 * @param p_commit_frequency The number of messages to purge before committing.
107 * @rep:scope public
108 * @rep:lifecycle active
109 * @rep:displayname Purge Event Queue
110 * @rep:compatibility S
111 */
112 procedure purge_evt_queue(p_queue_name in VARCHAR2,
113 p_consumer_name in VARCHAR2 default null,
114 p_correlation in VARCHAR2 default null,
115 p_commit_frequency in NUMBER default 100);
116
117 end wf_bes_cleanup;