1 package WF_EVENT_FUNCTIONS_PKG as
2 /* $Header: WFEVFNCS.pls 120.2 2005/11/28 00:52:39 nravindr ship $ */
3 /*#
4 * Provides utility functions to communicate with the Business Event
5 * System and manage events.
6 * @rep:scope public
7 * @rep:product OWF
8 * @rep:displayname Workflow Event Functions
9 * @rep:lifecycle active
10 * @rep:compatibility S
11 * @rep:category BUSINESS_ENTITY WF_EVENT
12 * @rep:ihelp FND/@evfuncapis See the related online help
13 */
14
15 ------------------------------------------------------------------------------
16 type T_PARAMETERS is TABLE of varchar2(240);
17 ------------------------------------------------------------------------------
18 /*#
19 * Generates the event data for events in the Seed event group. This event
20 * data contains Business Event System object definitions which can be
21 * used to replicate the objects from one system to another. For the event,
22 * event group, system, agent, agent group member, and subscription definition
23 * events, WF_EVENT_FUNCTIONS_PKG.Generate() calls the Generate APIs associated
24 * with the corresponding tables to produce the event data XML document. For
25 * the Synchronize Event Systems event, WF_EVENT_FUNCTIONS_PKG.Generate()
26 * produces an XML document containing all the event, event group, system,
27 * agent, agent group member, and subscription definitions from the Event
28 * Manager on the local system.
29 * @param p_event_name Event Name
30 * @param p_event_key Event Key
31 * @return Event Data as CLOB
32 * @rep:scope public
33 * @rep:lifecycle active
34 * @rep:displayname Generate Event Data for Seed Event Group
35 * @rep:compatibility S
36 * @rep:ihelp FND/@evfuncapis#a_evfgen See the related online help
37 */
38 function GENERATE (
39 P_EVENT_NAME in varchar2,
40 P_EVENT_KEY in varchar2
41 ) return clob;
42 ------------------------------------------------------------------------------
43 /*#
44 * Generates the event data for events in the Seed event group. This event
45 * data contains Business Event System object definitions which can be
46 * used to replicate the objects from one system to another. For the event,
47 * event group, system, agent, agent group member, and subscription definition
48 * events, WF_EVENT_FUNCTIONS_PKG.Generate() calls the function
49 * WF_EVENT_FUNCTIONS_PKG.Generate() ignoring the wf_parameter_list_t, which
50 * in turn calls the APIs associated with the corresponding tables to produce
51 * the event data XML document. For the Synchronize Event Systems event,
52 * WF_EVENT_FUNCTIONS_PKG.Generate() produces an XML document containing all
53 * the event, event group, system, agent, agent group member, and subscription
54 * definitions from the Event Manager on the local system.
55 * @param p_event_name Event Name
56 * @param p_event_key Event Key
57 * @param p_parameter_list Event Parameter List
58 * @return Event Data as CLOB
59 * @rep:scope internal
60 * @rep:lifecycle active
61 * @rep:displayname Generate Event Data for Seed Event Group
62 * @rep:compatibility S
63 */
64 function GENERATE (
65 P_EVENT_NAME in varchar2,
66 P_EVENT_KEY in varchar2,
67 P_PARAMETER_LIST in wf_parameter_list_t
68 ) return clob;
69 ------------------------------------------------------------------------------
70 /*#
71 * Receives Business Event System object definitions during subscription
72 * processing and loads the definitions into the appropriate Business
73 * Event System tables. This function completes the replication of the
74 * objects from one system to another. WF_EVENT_FUNCTIONS_PKG.Receive() is
75 * defined according the the standard API for an event subscription rule
76 * function. Oracle Workflow uses WF_EVENT_FUNCTIONS_PKG.Receive() as the
77 * rule function for two predefined subscriptions, one that is triggered when
78 * the System Signup event is raised locally, and one that is triggered when
79 * any of the events in the Seed event group is received from an external
80 * source.
81 * @param p_subscription_guid Subscription GUID
82 * @param p_event Event Message
83 * @return Result as ERROR, SUCCESS, WARNING
84 * @rep:scope public
85 * @rep:lifecycle active
86 * @rep:displayname Receive Event Data for Seed Event Group
87 * @rep:compatibility S
88 * @rep:ihelp FND/@evfuncapis#a_evfrec See the related online help
89 */
90 function RECEIVE (
91 P_SUBSCRIPTION_GUID in raw,
92 P_EVENT in out nocopy wf_event_t
93 ) return varchar2;
94 ------------------------------------------------------------------------------
95 procedure SEND (
96 P_EVENTNAME in varchar2,
97 P_EVENTKEY in varchar2,
98 P_EVENTDATA in clob,
99 P_TOAGENT in varchar2,
100 P_TOSYSTEM in varchar2,
101 P_PRIORITY in number,
102 P_SENDDATE in date
103 );
104 ------------------------------------------------------------------------------
105 /*#
106 * Parses a string of text that contains the specified number of parameters
107 * delimited by the specified separator. Parameters() returns the parsed
108 * parameters in a varray using the T_PARAMETERS composite datatype, which is
109 * defined in the WF_EVENT_FUNCTIONS_PKG package. Parameters() is a generic
110 * utility that you can call in Generate functions when the event key is a
111 * concatenation of values separated by a known character. Use this function
112 * to separate the event key into its component values.
113 * @param p_string String with concatenated values
114 * @param p_numvalues Number of values
115 * @param p_separator Delimiter for values
116 * @return Array of parameters
117 * @rep:scope public
118 * @rep:lifecycle active
119 * @rep:displayname Parse for Parameters
120 * @rep:compatibility S
121 * @rep:ihelp FND/@evfuncapis#a_evfpar See the related online help
122 */
123 function PARAMETERS (
124 P_STRING in varchar2,
125 P_NUMVALUES in number,
126 P_SEPARATOR in varchar2)
127 return t_parameters;
128 ------------------------------------------------------------------------------
129 /*#
130 * Adds a correlation ID to an event message during subscription
131 * processing. AddCorrelation() searches the subscription parameters for
132 * a parameter named ITEMKEY that specifies a custom function to generate
133 * a correlation ID for the event message.
134 * @param p_subscription_guid Subscription GUID
135 * @param p_event Event Message
136 * @return Status as ERROR, SUCCESS, WARNING
137 * @rep:scope public
138 * @rep:lifecycle active
139 * @rep:displayname Add Correlation ID
140 * @rep:compatibility S
141 * @rep:ihelp FND/@evfuncapis#a_evfadd See the related online help
142 */
143 function ADDCORRELATION (
144 P_SUBSCRIPTION_GUID in raw,
145 P_EVENT in out nocopy wf_event_t
146 ) return varchar2;
147 ------------------------------------------------------------------------------
148 /*#
149 * Returns the value for the specified parameter from a text string
150 * containing the parameters defined for an event subscription. The
151 * parameter name and value pairs in the text string should be separated
152 * by spaces and should appear in the following format: name1=value1
153 * name2=value2 ... nameN=valueN
154 * @param p_string Text string with the parameters
155 * @param p_key Parameter Name to get the value
156 * @param p_guid Subscription GUID
157 * @return Parameter Value
158 * @rep:scope public
159 * @rep:lifecycle active
160 * @rep:displayname Get Subscription Parameter Value
161 * @rep:compatibility S
162 * @rep:ihelp FND/@evfuncapis#a_evfsub See the related online help
163 */
164 function SUBSCRIPTIONPARAMETERS (
165 P_STRING in out nocopy varchar2,
166 P_KEY in varchar2,
167 P_GUID in raw default NULL
168 ) return varchar2;
169
170 ------------------------------------------------------------------------------
171 function SubParamInEvent(p_guid in raw,
172 p_event in out NOCOPY wf_event_t,
173 p_match in varchar2 DEFAULT 'ALL' )
174 return boolean;
175
176 ------------------------------------------------------------------------------
177 Procedure UpdateLicenseStatus (p_OwnerTag in varchar2, p_Status in varchar2);
178
179 end WF_EVENT_FUNCTIONS_PKG;