1 PACKAGE jtf_fm_process_request_wf AS
2 /* $Header: jtffmwfs.pls 120.0 2005/05/11 08:14:29 appldev ship $ */
3 -- PROCEDURE start fulfillment request
4 -- DESCRIPTION This procedure is called to start standard fulfillment workflow,
5 --assigns all attributes what jtf_fm_request_grp.submit_request api needs and launches the work flow.
6 --IN OUT
7 --p_api_version,p_init_msg_list,p_commit,p_validation_level,x_return_status,x_msg_data,x_msg_count are standard
8 -- api parameters.
9 --x_msg_count : Message count holds the number of messages in the API message list if this no
10 -- is one ,then message data holds the message in an encoded format.
11 --x_msg_data : Message in encoded format.
12 --x_return_status:represents the result of all operations performed by the API and must have one of the following
13 -- 'S' (success)or 'E' (error) or 'U' (un explained).
14 -- content xml : The content xml formed by calling the Get_Content_XML.
15 -- content id : unique id of the content( Required)
16 -- for content type of 'ATTACHMENT' ,the document must be stored in the fnd_lobs table and the
17 -- file_id (primary key in FND_LOBS table) must be passed as content_id.
18 -- for content_type of 'COLLATERAL','DATA', and 'QUERY' the item_id for the document in the MES tables
19 -- must be passed as content_id.
20 --request_id : Request ID obtained by calling the Start_Request API (system generated unique request id)
21 --template id : Fulfillment request template id (request templates are predefined and stored in the
22 -- database).The template id is null if the request does not correspond to a predefined template.
23 --subject :
24 --party_id : Customer ID.
25 --party_name
26 --user_id : Agent/user_id.
27 --priority : These are defined as global constants in package JTF_FM_Request_GRP.
28 -- User Note - Unused priority numbers are for future use.
29 --source_code_id: Campaign/promotion field.
30 --source_code : Campaign/promotion field.
31 --object_type : Campaign/promotion field.
32 --object_id : Campaign/promotion field.
33 --order_id : Unique identifier of the order.
34 --doc_id :
35 --doc_ref :
36 --server_id : Unique identifier of the sever.
37 --queue_response: Field to specify if response needs to queued in Response queue.
38 --extended_header:
39 ---------------------------------------------------------------------
40 PROCEDURE start_fulfillment_request(item_type IN VARCHAR2,
41 item_key IN VARCHAR2,
42 item_user_key IN VARCHAR2,
43 p_content_xml IN VARCHAR2,
44 p_content_id IN NUMBER,
45 p_Request_id IN NUMBER,
46 p_template_id IN NUMBER ,
47 p_subject IN VARCHAR2,
48 p_party_id IN NUMBER ,
49 p_party_name IN VARCHAR2 ,
50 p_user_id IN VARCHAR2,
51 p_priority IN NUMBER ,
52 p_source_code_id IN NUMBER,
53 p_source_code IN VARCHAR2,
54 p_object_type IN VARCHAR2 ,
55 p_object_id IN NUMBER ,
56 p_order_id IN NUMBER ,
57 p_doc_id IN NUMBER ,
58 p_doc_ref IN VARCHAR2 ,
59 p_server_id IN NUMBER ,
60 p_queue_response IN VARCHAR2,
61 p_extended_header IN VARCHAR2 ,
62 p_api_version IN NUMBER,
63 p_init_msg_list IN VARCHAR2,
64 p_commit IN VARCHAR2,
65 p_validation_level IN NUMBER ,
66 x_Result IN OUT NOCOPY VARCHAR2,
67 x_msg_count IN OUT NOCOPY VARCHAR2,
68 x_msg_data IN OUT NOCOPY VARCHAR2,
69 x_return_status IN OUT NOCOPY VARCHAR2);
70 ----------------------------------------------------------------------
71 --PROCEDURE submit_fulfillment_request
72 --DESCRIPTION calls the jtf_fm_request_grp.submit_request
73 -- IN
74 -- itemtype : type of the current item
75 -- itemkey : key of the current item
76 -- actid : process activity instance id
77 -- funcmode : function execution mode ('RUN','CANCEL','TIMEOUT');
78 -- OUT
79 -- resultout :
80 -- COMPLETE : <resultout>
81 --activity has completed with indicated result
82 -- WAITING
83 --activity is waiting for additional transitions
84 --DEFERED
85 --execution should be deferred to background
86 --NOTIFIED <notification_id> <assigned_user>
87 --activity has notified an external entity that this step must be
88 --performed . A call to wf_engine , complete activity will signal when this step is complete
89 --return of notification id and assigned user
90 --ERROR <error_code>
91 --function encountered an error
92 -----------------------------
93 PROCEDURE submit_fulfillment_request (
94 itemtype IN VARCHAR2,
95 itemkey IN VARCHAR2,
96 actid IN NUMBER,
97 funcmode IN VARCHAR2,
98 resultout OUT NOCOPY VARCHAR2);
99 ---------------------------------------------------------------------
100 --PROCEDURE check_request_result
101 --DESCRIPTION : checks the result from the submit_fulfillment_request
102 -- IN
103 -- itemtype : type of the current item
104 -- itemkey : key of the current item
105 -- actid : process activity instance id
106 -- funcmode : function execution mode ('RUN','CANCEL','TIMEOUT');
107 -- OUT
108 -- resultout :
109 -- COMPLETE : <resultout>
110 --activity has completed with indicated result
111 -- WAITING
112 --activity is waiting for additional transitions
113 --DEFERED
114 --execution should be deferred to background
115 --NOTIFIED <notification_id> <assigned_user>
116 --activity has notified an external entity that this step must be
117 --performed . A call to wf_engine , complete activity will signal when this step is complete
118 --return of notification id and assigned user
119 --ERROR <error_code>
120 --function encountered an error
121 PROCEDURE Check_request_result (
122 itemtype IN VARCHAR2,
123 itemkey IN VARCHAR2,
124 actid IN NUMBER,
125 funcmode IN VARCHAR2,
126 resultout OUT NOCOPY VARCHAR2);
127 -----------------------------------------------------------------------
128 -- PROCEDURE schedule_Callback
129 --
130 -- Description Creates a callback.
131 --
132 -- IN
133 -- itemtype - type of the current item
134 -- itemkey - key of the current item
135 -- actid - process activity instance id
136 -- funcmode - function execution mode ('RUN', 'CANCEL', 'TIMEOUT', ...)
137 -- OUT
138 -- result
139 -- - COMPLETE[:<result>]
140 -- activity has completed with the indicated result
141 -- - WAITING
142 -- activity is waiting for additional transitions
143 -- - DEFERED
144 -- execution should be defered to background
145 -- - NOTIFIED[:<notification_id>:<assigned_user>]
146 -- activity has notified an external entity that this
147 -- step must be performed. A call to wf_engine.CompleteActivty
148 -- will signal when this step is complete. Optional
149 -- return of notification ID and assigned user.
150 -- - ERROR[:<error_code>]
151 -- function encountered an error.
152 PROCEDURE schedule_Callback (itemtype in VARCHAR2,
153 itemkey in VARCHAR2,
154 actid in NUMBER,
155 funcmode in VARCHAR2,
156 result out nocopy VARCHAR2 );
157 -----------------------------------------------------
158 -- PROCEDURE schedule_Callback
159 --
160 -- Description Creates a callback.
161 --
162 -- IN
163 -- itemtype - type of the current item
164 -- itemkey - key of the current item
165 -- actid - process activity instance id
166 -- funcmode - function execution mode ('RUN', 'CANCEL', 'TIMEOUT', ...)
167 -- OUT
168 -- result
169 -- - COMPLETE[:<result>]
170 -- activity has completed with the indicated result
171 -- - WAITING
172 -- activity is waiting for additional transitions
173 -- - DEFERED
174 -- execution should be defered to background
175 -- - NOTIFIED[:<notification_id>:<assigned_user>]
176 -- activity has notified an external entity that this
177 -- step must be performed. A call to wf_engine.CompleteActivty
178 -- will signal when this step is complete. Optional
179 -- return of notification ID and assigned user.
180 -- - ERROR[:<error_code>]
181 -- function encountered an error.
182 PROCEDURE check_if_callback_required (itemtype in VARCHAR2,
183 itemkey in VARCHAR2,
184 actid in NUMBER,
185 funcmode in VARCHAR2,
186 result out nocopy VARCHAR2 );
187 --------------------------------------------------------
188 -- PROCEDURE verify_external
189 --
190 -- Description perform third party verification
191 --
192 -- IN
193 -- itemtype - type of the current item
194 -- itemkey - key of the current item
195 -- actid - process activity instance id
196 -- funcmode - function execution mode ('RUN', 'CANCEL', 'TIMEOUT', ...)
197 -- OUT
198 -- result
199 -- - COMPLETE[:<result>]
200 -- activity has completed with the indicated result
201 -- - WAITING
202 -- activity is waiting for additional transitions
203 -- - DEFERED
204 -- execution should be defered to background
205 -- - NOTIFIED[:<notification_id>:<assigned_user>]
206 -- activity has notified an external entity that this
207 -- step must be performed. A call to wf_engine.CompleteActivty
208 -- will signal when this step is complete. Optional
209 -- return of notification ID and assigned user.
210 -- - ERROR[:<error_code>]
211 -- function encountered an error.
212 PROCEDURE verify_external (itemtype in VARCHAR2,
213 itemkey in VARCHAR2,
214 actid in NUMBER,
215 funcmode in VARCHAR2,
216 result out nocopy VARCHAR2 );
217 -----------------------------------------------------------
218 -- PROCEDURE verification_failed_notification
219 --
220 -- Description sends notification
221 --
222 -- IN
223 -- itemtype - type of the current item
224 -- itemkey - key of the current item
225 -- actid - process activity instance id
226 -- funcmode - function execution mode ('RUN', 'CANCEL', 'TIMEOUT', ...)
227 -- OUT
228 -- result
229 -- - COMPLETE[:<result>]
230 -- activity has completed with the indicated result
231 -- - WAITING
232 -- activity is waiting for additional transitions
233 -- - DEFERED
234 -- execution should be defered to background
235 -- - NOTIFIED[:<notification_id>:<assigned_user>]
236 -- activity has notified an external entity that this
237 -- step must be performed. A call to wf_engine.CompleteActivty
238 -- will signal when this step is complete. Optional
239 -- return of notification ID and assigned user.
240 -- - ERROR[:<error_code>]
241 -- function encountered an error.
242 PROCEDURE verification_failed(itemtype in VARCHAR2,
243 itemkey in VARCHAR2,
244 actid in NUMBER,
245 funcmode in VARCHAR2,
246 result out nocopy VARCHAR2 );
247 END jtf_fm_process_request_wf ;
248