1 PACKAGE WMS_RFID_DEVICE_PUB AS
2 /* $Header: WMSRFIDS.pls 120.4 2006/07/06 19:24:18 satkumar ship $ */
3 /*#
4 * This object processes EPC/LPN data read through RFID or barcode reader.
5 * @rep:scope public
6 * @rep:product WMS
7 * @rep:lifecycle active
8 * @rep:displayname RFID/barcode read processing APIs for WMS
9 * @rep:category BUSINESS_ENTITY WMS_RFID_DEVICE
10 */
11
12
13 TYPE t_genref IS REF CURSOR;
14
15 TYPE tag_info IS RECORD
16 (
17 tag_id VARCHAR2(260) --WILL HOLD THE EPC CODE
18 ,tag_data VARCHAR2(130)
19 ,lpn_id NUMBER
20 ,parent_lpn_id NUMBER
21 ,item_id NUMBER
22 ,serial_number VARCHAR2(30) --MSN has it as varchar2
23 ,gtin NUMBER
24 ,gtin_serial NUMBER
25 );
26
27 TYPE tag_info_tbl IS TABLE OF tag_info INDEX BY BINARY_INTEGER;
28
29
30 /*#
31 *
32 * This API will process the RFID or barcode scan read data (p_tagid) and
33 * perform the transactions after identifying what to do with the read data.
34 * Only LPN_Id will be read by the hardware and process_rfid_txn() API
35 * will perform the appropriate transaction. Set up defined in the 'Define
36 * Device' and 'Assign Device' forms of Oracle Warehouse Management are used to
37 * identify the valid transactions to process.
38 *
39 * Processed records will be stored in the XML file (depending on the set up of
40 * the 'Define Device' form and WMS_DEVICE_REQUESTS_HIST table). If the system
41 * is unable to determine what to do with the read tag value then the XML is
42 * generated but no transaction processing will occur.
43 * If the processing fails or succeeds after determining the business
44 * event, a record is stored in both XML and WMS_DEVICE_REQUESTS_HIST
45 * table. Details of WMS_DEVICE_REQUESTS_HIST table can be viewed through
46 * 'Device Requests History' form.
47 *
48 * (This API will be called mainly by the Oracle Edge Server and it acts as an
49 * interface between Oracle Edge Server and Oracle Warehouse Management for
50 * RFID transactions.)
51 *
52 * The following parameters are included but are not currently used.
53 * p_system_id : System identifier with seperate physical locations. It
54 * will be used mainly for physical location of org. To avoid the case in which same device
55 * name exists in two different organizations, we suggest that p_system_id
56 * should be passed as organization_id (based on physical location) so that
57 * we can uniquely identify which device is referred.
58 * p_statuschange : Boolean indicating change of data on the tag
59 * p_datachange:
60 * p_status : indicates whether the reader is active
61 * p_x : x location of the tag
62 * p_y : y location of the tag
63 * x_return_value : success/error/warning
64 * x_return_mesg : message to be displayed on the message board of response device
65 * @ param p_tagid Written EPC/LPN values on RFID tag
66 * @ paraminfo {@rep:required}
67 * @ param p_tagdata Extra data on the tag, Not used Currently
68 * @ paraminfo {@rep:required}
69 * @ param p_portalid Reader Name fomr the 'Define Device Form' in WMS
70 * @ paraminfo {@rep:required}
71 * @ param p_event_date read time of RFID tag
72 * @ paraminfo {@rep:required}
73 * @ param p_system_id NOT used currently in WMS,System identifier with seperate physical locations. It will be used mainly for physical location of org. To avoid the case in which same device name exists in two different organizations
74 * @ paraminfo {@rep:optional}
75 * @ param p_statuschange NOT used currently,Boolean indicating change of data on the tag
76 * @ paraminfo {@rep:optional}
77 * @ param p_datachange NOT used currently,whether data on tag changed
78 * @ paraminfo {@rep:optional}
79 * @ param p_status NOT used currently,indicates whether the reader is active
80 * @ paraminfo {@rep:optional}
81 * @ param p_x x location of the tag
82 * @ paraminfo {@rep:optional}
83 * @ param p_y y location of the tag
84 * @ paraminfo {@rep:optional}
85 * @ param x_return_value success/error/warning
86 * @ paraminfo {@rep:required}
87 * @ param x_return_mesg message to be displayed on the message board of response device
88 * @ paraminfo {@rep:required}
89 * @rep:scope public
90 * @rep:lifecycle active
91 * @rep:displayname API to process RFID enabled WMS transactions
92 * @rep:businessevent process_rfid_txn
93 */
94 procedure process_rfid_txn
95 (
96 p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
97 p_tagdata IN WMS_EPC_TAGDATA_TYPE,-- ANY ADDITIONAL DATA IN TAG AS VARRAY
98 p_portalid in varchar2,--reader name
99 p_event_date in date,
100 p_system_id in VARCHAR2 DEFAULT null,
101 p_statuschange in NUMBER DEFAULT null,
102 p_datachange in NUMBER DEFAULT null,
103 p_status in NUMBER DEFAULT null,
104 p_x in NUMBER DEFAULT null,
105 p_y in NUMBER DEFAULT NULL,
106 x_return_value out nocopy VARCHAR2, --success,error,warning
107 x_return_mesg OUT nocopy varchar2);
108
109 /*
110 API is below is same as above process_rfid_txn() ecept that it will
111 return the request_id for device transaction as well. Internally it does
112 call above process_rfid_txn
113 */
114
115 /*#
116 *
117 * This API is the same as other process_rfid_txn() API except that it
118 * will return the request_id for device transaction as well. Internally it
119 * will call process_rfid_txn.
120 * @ param p_tagid Written EPC/LPN values on RFID tag
121 * @ paraminfo {@rep:required}
122 * @ param p_tagdata Extra data on the tag, Not used Currently
123 * @ paraminfo {@rep:required}
124 * @ param p_portalid Reader Name fomr the 'Define Device Form' in WMS
125 * @ paraminfo {@rep:required}
126 * @ param p_event_date read time of RFID tag
127 * @ paraminfo {@rep:required}
128 * @ param p_system_id NOT used currently in WMS, System identifier with separate physical locations. It will be used mainly for physical location of org. To avoid the case in which same device name exists in two different organizations
129 * @ paraminfo {@rep:optional}
130 * @ param p_statuschange NOT used currently,Boolean indicating change of data on the tag
131 * @ paraminfo {@rep:optional}
132 * @ param p_datachange NOT used currently,whether data on tag changed
133 * @ paraminfo {@rep:optional}
134 * @ param p_status NOT used currently,indicates whether the reader is active
135 * @ paraminfo {@rep:optional}
136 * @ param p_x x location of the tag
137 * @ paraminfo {@rep:optional}
138 * @ param p_y y location of the tag
139 * @ paraminfo {@rep:optional}
140 * @ param x_return_value success/error/warning
141 * @ paraminfo {@rep:required}
142 * @ param x_return_mesg message to be displayed on the message board of response device
143 * @ paraminfo {@rep:required}
144 * @ param x_request_id processed request_id
145 * @ paraminfo {@rep:required}
146 * @rep:scope public
147 * @rep:lifecycle active
148 * @rep:displayname API to process RFID enabled WMS transactions
149 * @rep:businessevent process_rfid_txn
150 */
151 procedure process_rfid_txn
152 (
153 p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
154 p_tagdata IN WMS_EPC_TAGDATA_TYPE,-- ANY ADDITIONAL DATA IN TAG AS VARRAY
155 p_portalid in VARCHAR2,--number as varchar2
156 p_event_date in DATE,
157 p_system_id in VARCHAR2 DEFAULT null,
158 p_statuschange in NUMBER DEFAULT null,
159 p_datachange in NUMBER DEFAULT null,
160 p_status in NUMBER DEFAULT null,
161 p_x in NUMBER DEFAULT null,
162 p_y in NUMBER DEFAULT NULL,
163 x_return_value out nocopy VARCHAR2, --success,error,warning
164 x_return_mesg OUT nocopy VARCHAR2,
165 x_request_id OUT nocopy NUMBER
166 );
167
168
169
170 /*#
171 *
172 * This API, if registred with the Oracle Edge Server, will return a
173 * status that will indicate that the RFID tag has been read. This API should
174 * have a higher priority in the registered callback table so that it can get
175 * called before the transaction processing starts.
176 *
177 * Example set up:
178 * API priority
179 * process_wmsc_epc_rfid_txn 10
180 * WMS_READ_EVENT 20
181 *
182 * Procedure WMS_READ_EVENT should get called first for each read.
183 *
184 * @ param p_tagid Written EPC/LPN values on RFID tag
185 * @ paraminfo {@rep:required}
186 * @ param p_tagdata Extra data on the tag, Not used Currently
187 * @ paraminfo {@rep:required}
188 * @ param p_portalid Reader Name fomr the 'Define Device Form' in WMS
189 * @ paraminfo {@rep:required}
190 * @ param p_event_date read time of RFID tag
191 * @ paraminfo {@rep:required}
192 * @ param p_system_id NOT used currently in WMS,System identifier with seperate physical locations. It will be used mainly for physical location of org. To avoid the case in which same device name exists in two different organizations
193 * @ paraminfo {@rep:optional}
194 * @ param p_statuschange NOT used currently,Boolean indicating change of data on the tag
195 * @ paraminfo {@rep:optional}
196 * @ param p_datachange NOT used currently,whether data on tag changed
197 * @ paraminfo {@rep:optional}
198 * @ param p_status NOT used currently,indicates whether the reader is active
199 * @ paraminfo {@rep:optional}
200 * @ param p_x x location of the tag
201 * @ paraminfo {@rep:optional}
202 * @ param p_y y location of the tag
203 * @ paraminfo {@rep:optional}
204 * @ param x_return_value success/error/warning
205 * @ paraminfo {@rep:required}
206 * @ param x_return_mesg message to be displayed on the message board of response device
207 * @ paraminfo {@rep:required}
208 * @rep:scope public
209 * @rep:lifecycle active
210 * @rep:displayname API to process RFID enabled WMS transactions
211 * @rep:businessevent WMS_READ_EVENT
212 */
213 Procedure WMS_READ_EVENT
214 (
215 p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
216 p_tagdata IN WMS_EPC_TAGDATA_TYPE,-- ANY ADDITIONAL DATA IN TAG AS VARRAY
217 p_portalid in VARCHAR2,
218 p_event_date in date,
219 p_system_id in VARCHAR2 DEFAULT null,
220 p_statuschange in NUMBER DEFAULT null,
221 p_datachange in NUMBER DEFAULT null,
222 p_status in NUMBER DEFAULT null,
223 p_x in NUMBER DEFAULT null,
224 p_y in NUMBER DEFAULT null,
225 x_return_value out nocopy VARCHAR2, --success,error,warning
226 x_return_mesg out nocopy varchar2
227 ) ;
228
229 --Internal Wrapper API for testing purpose only using Mobile
230 --Not to be touched by customer
231 procedure MobTest_process_rfid_txn
232 (
233 p_tagid in clob, -- EPC tag ID
234 p_tagdata IN clob, -- Any additional value with EPC tag
235 p_portalid in varchar2,--reader name
236 p_event_date in date,
237 p_system_id in VARCHAR2 DEFAULT null,
238 p_statuschange in NUMBER DEFAULT null,
239 p_datachange in NUMBER DEFAULT null,
240 p_status in NUMBER DEFAULT null,
241 p_x in NUMBER DEFAULT null,
242 p_y in NUMBER DEFAULT NULL,
243 x_return_value out nocopy VARCHAR2, --success,error,warning
244 x_return_mesg OUT nocopy varchar2);
245
246 END WMS_RFID_DEVICE_PUB;