DBA Data[Home] [Help]

PACKAGE: APPS.CSF_TRIPS_PUB

Source


1 PACKAGE csf_trips_pub AUTHID CURRENT_USER AS
2   /* $Header: CSFPTRPS.pls 120.7 2011/04/26 10:56:41 vakulkar ship $ */
3 
4   -- Maps to a Trip Record in CAC_SR_OBJECT_CAPACITY Table.
5   TYPE trip_rec_type IS RECORD (
6     trip_id                 NUMBER
7   , object_version_number   NUMBER
8   , resource_type           VARCHAR2(30)
9   , resource_id             NUMBER
10   , start_date_time         DATE
11   , end_date_time           DATE
12   , available_hours         NUMBER
13   , available_hours_before  NUMBER
14   , available_hours_after   NUMBER
15   , schedule_detail_id      NUMBER
16   , status                  NUMBER
17   , availability_type      varchar2(30)
18   );
19 
20   -- A Table of Trips.
21   TYPE trip_tbl_type IS TABLE OF trip_rec_type
22     INDEX BY BINARY_INTEGER;
23 
24   g_action_create_trip  CONSTANT VARCHAR2(10) := 'ADD';
25   g_action_delete_trip  CONSTANT VARCHAR2(10) := 'DELETE';
26   g_action_replace_trip CONSTANT VARCHAR2(10) := 'REPLACE';
27   g_action_fix_trip     CONSTANT VARCHAR2(10) := 'FIX';
28   g_action_upgrade_trip CONSTANT VARCHAR2(10) := 'UPGRADE';
29   g_action_close_trip   CONSTANT VARCHAR2(10) := 'CLOSE';
30   g_action_block_trip   CONSTANT VARCHAR2(10) := 'BLOCK';
31   g_action_unblock_trip CONSTANT VARCHAR2(10) := 'UNBLOCK';
32 
33   g_trip_unavailable    CONSTANT NUMBER := 0;
34   g_trip_available      CONSTANT NUMBER := 1;
35 
36   /**
37    * Searches for a Trip existing for the passed selection criteria.
38    * Searches CAC_SR_OBJECT_CAPACITY for the Trips that exists for the Resource
39    * identified by P_RESOURCE_ID before the passed two dates.
40    * <br>
41    * Fills the message stack with the message identified by CSF_NO_TRIPS_FOUND or
42    * CSF_MULTIPLE_TRIPS_FOUND upon encountering Zero Trips or Many Trips
43    * respectively.
44    * <br>
45    * Differs from the overloaded version of FIND_TRIP in the sense that this API
46    * returns the entire Trip Structure.
47    *
48    * @param  p_api_version             API Version (1.0)
49    * @param  p_init_msg_list           Initialize Message List
50    * @param  x_return_status           Return Status of the Procedure.
51    * @param  x_msg_data                Stack of Error Messages.
52    * @param  x_msg_count               Number of Messages in the Stack.
53    * @param  p_resource_id             Resource ID
54    * @param  p_resource_type           Resource Type
55    * @param  p_start_date_time         Start Date Time
56    * @param  p_end_date_time           End Date Time
57    * @param  p_overtime_flag           Flag to consider Overtime (Optional.. Defaults to FND_API.G_TRUE)
58    * @param  x_trip                    Fetched Trips
59    *
60    * @see find_trips                   Find many Trips API
61    **/
62   PROCEDURE find_trip(
63     p_api_version      IN          NUMBER
64   , p_init_msg_list    IN          VARCHAR2 DEFAULT NULL
65   , x_return_status   OUT  NOCOPY  VARCHAR2
66   , x_msg_data        OUT  NOCOPY  VARCHAR2
67   , x_msg_count       OUT  NOCOPY  NUMBER
68   , p_resource_id      IN          NUMBER
69   , p_resource_type    IN          VARCHAR2
70   , p_start_date_time  IN          DATE
71   , p_end_date_time    IN          DATE
72   , p_overtime_flag    IN          VARCHAR2 DEFAULT NULL
73   , x_trip            OUT  NOCOPY  trip_rec_type
74   );
75 
76   /**
77    * Searches for a Trip existing for the passed selection criteria.
78    * Searches CAC_SR_OBJECT_CAPACITY for the Trips that exists for the Resource
79    * identified by P_RESOURCE_ID before the passed two dates.
80    * <br>
81    * Fills the message stack with the message identified by CSF_NO_TRIPS_FOUND or
82    * CSF_MULTIPLE_TRIPS_FOUND upon encountering Zero Trips or Many Trips
83    * respectively.
84    * <br>
85    * Differs from the overloaded version of FIND_TRIP in the sense that this API
86    * returns only the Trip ID.
87    *
88    * @param  p_api_version             API Version (1.0)
89    * @param  p_init_msg_list           Initialize Message List
90    * @param  x_return_status           Return Status of the Procedure.
91    * @param  x_msg_data                Stack of Error Messages.
92    * @param  x_msg_count               Number of Messages in the Stack.
93    * @param  p_resource_id             Resource ID
94    * @param  p_resource_type           Resource Type
95    * @param  p_start_date_time         Start Date Time
96    * @param  p_end_date_time           End Date Time
97    * @param  p_overtime_flag           Flag to consider Overtime (Optional.. Defaults to FND_API.G_TRUE)
98    * @param  x_trip_id                 Fetched Trip ID
99    *
100    * @see find_trips                   Find many Trips API
101    **/
102   PROCEDURE find_trip(
103     p_api_version      IN          NUMBER
104   , p_init_msg_list    IN          VARCHAR2 DEFAULT NULL
105   , x_return_status   OUT  NOCOPY  VARCHAR2
106   , x_msg_data        OUT  NOCOPY  VARCHAR2
107   , x_msg_count       OUT  NOCOPY  NUMBER
108   , p_resource_id      IN          NUMBER
109   , p_resource_type    IN          VARCHAR2
110   , p_start_date_time  IN          DATE
111   , p_end_date_time    IN          DATE
112   , p_overtime_flag    IN          VARCHAR2 DEFAULT NULL
113   , x_trip_id         OUT  NOCOPY  NUMBER
114   );
115 
116   /**
117    * Searches for all the Trips existing for the passed selection criteria.
118    * Searches CAC_SR_OBJECT_CAPACITY for the Trips that exists between the
119    * passed two dates for each resource in the passed Resource List.
120    * <br>
121    * Doesnt throw any error message.
122    *
123    * @param  p_api_version             API Version (1.0)
124    * @param  p_init_msg_list           Initialize Message List
125    * @param  x_return_status           Return Status of the Procedure.
126    * @param  x_msg_data                Stack of Error Messages.
127    * @param  x_msg_count               Number of Messages in the Stack.
128    * @param  p_resource_tbl            Table of Resources containing Resource ID and Type.
129    * @param  p_start_date_time         Start Date Time
130    * @param  p_end_date_time           End Date Time
131    * @param  p_overtime_flag           Flag to consider Overtime (Optional..Defaults to FND_API.G_TRUE)
132    * @param  x_trips                   Fetched Trips
133    *
134    * @see find_trip                    Find a Single Trip API
135    **/
136   PROCEDURE find_trips(
137     p_api_version        IN          NUMBER
138   , p_init_msg_list      IN          VARCHAR2 DEFAULT NULL
139   , x_return_status     OUT  NOCOPY  VARCHAR2
140   , x_msg_data          OUT  NOCOPY  VARCHAR2
141   , x_msg_count         OUT  NOCOPY  NUMBER
142   , p_resource_tbl       IN          csf_resource_pub.resource_tbl_type
143   , p_start_date_time    IN          DATE
144   , p_end_date_time      IN          DATE
145   , p_overtime_flag      IN          VARCHAR2 DEFAULT NULL
146   , x_trips             OUT  NOCOPY  trip_tbl_type
147   );
148 
149   /**
150    * Creates a Trip for the passed Resource constrained by the two times.
151    * Creates a new Trip for the Resource identified by P_RESOURCE_ID constrained
152    * by the two times Start and End Time.
153    * <br>
154    * This API checks for the existence of any trip which overlaps with the
155    * specified boundary conditions for the Resource. Upon that error, the message
156    * CSF_TRIP_ALREADY_EXISTS is pushed into the message stack.
157    * Moreover it doesnt allow for a trip to be created if there exists some Shift
158    * Tasks in the new Trip interval. Upon that error, the message
159    * CSF_SHIFT_TASKS_EXIST is pushed into the message stack.
160    * <br>
161    * In addition to the above check, it is also mandatory that the total duration
162    * between the two times should be less than or equal to 1 day.
163    * <br>
164    * 1. Moreover, the API automatically creates Shift Tasks 'Departure' and
165    * 'Arrival' at the two end points of the Trip if needed. <br>
166    * 2. The Availability of the Trip is set to the Total Duration between
167    * identified by P_RESOURCE_ID before the passed two dates.<br>
168    * 3. All the Task Assignments which fall within the Trip or overlap with
169    * any one of boundary times will be tied to the Trip automatically.
170    *
171    * @param  p_api_version             API Version (1.0)
172    * @param  p_init_msg_list           Initialize Message List
173    * @param  p_commit                  Commits the Database
174    * @param  x_return_status           Return Status of the Procedure.
175    * @param  x_msg_data                Stack of Error Messages.
176    * @param  x_msg_count               Number of Messages in the Stack.
177    * @param  p_resource_id             Resource ID
178    * @param  p_resource_type           Resource Type
179    * @param  p_start_date_time         Start Date Time
180    * @param  p_end_date_time           End Date Time
181    * @param  p_schedule_detail_id      (Not Used) Maps to CAC_SR_SCHEDULE_DETAILS
182    * @param  p_status                  Initial Status of the Trip (Unblocked).
183    * @param  p_find_tasks              Flag to indicate whether Tasks has to be linked
184    * @param  x_trip_id                 Trip ID of the new Trip created.
185    *
186    * @see create_trips                 Create Multiple Trips API
187    **/
188   PROCEDURE create_trip(
189     p_api_version           IN          NUMBER
190   , p_init_msg_list         IN          VARCHAR2 DEFAULT NULL
191   , p_commit                IN          VARCHAR2 DEFAULT NULL
192   , x_return_status        OUT  NOCOPY  VARCHAR2
193   , x_msg_data             OUT  NOCOPY  VARCHAR2
194   , x_msg_count            OUT  NOCOPY  NUMBER
195   , p_resource_id           IN          NUMBER
196   , p_resource_type         IN          VARCHAR2
197   , p_start_date_time       IN          DATE
198   , p_end_date_time         IN          DATE
199   , p_schedule_detail_id    IN          NUMBER   DEFAULT NULL
200   , p_status                IN          NUMBER   DEFAULT NULL
201   , p_find_tasks            IN          VARCHAR2 DEFAULT NULL
202   , x_trip_id              OUT  NOCOPY  NUMBER
203   );
204 
205   /**
206    * Deletes the Trip given the Trip ID.
207    *
208    * @param  p_api_version             API Version (1.0)
209    * @param  p_init_msg_list           Initialize Message List
210    * @param  p_commit                  Commits the Database
211    * @param  x_return_status           Return Status of the Procedure.
212    * @param  x_msg_data                Stack of Error Messages.
213    * @param  x_msg_count               Number of Messages in the Stack.
214    * @param  p_trip_id                 Trip ID
215    * @param  p_object_version_number   Trip Object Version Number
216    *
217    * @see update_trip                  Update Trip API
218    * @see delete_trips                 Delete Multiple Trips API
219    **/
220   PROCEDURE delete_trip(
221     p_api_version             IN          NUMBER
222   , p_init_msg_list           IN          VARCHAR2 DEFAULT NULL
223   , p_commit                  IN          VARCHAR2 DEFAULT NULL
224   , x_return_status          OUT  NOCOPY  VARCHAR2
225   , x_msg_data               OUT  NOCOPY  VARCHAR2
226   , x_msg_count              OUT  NOCOPY  NUMBER
227   , p_trip_id                 IN          NUMBER
228   , p_object_version_number   IN          NUMBER   DEFAULT NULL
229   );
230 
231   /**
232    * Updates the Availability of the Trip given the Trip ID.
233    * Updates the Available, Available Before,  Available After Hours of the Trip
234    * in the underlying database given the Trip ID.
235    * <br>
236    * The API first validates the passed Available Values. Both Available Hours and
237    * Update Available Hours cant be passed. Only one of them can be passed. If they
238    * make the Availability equal to Shift Length, then the value of Available Hours
239    * Before and After are ignored and they are updated as NULL. <br>
240    *
241    * @param  p_api_version             API Version (1.0)
242    * @param  p_init_msg_list           Initialize Message List
243    * @param  p_commit                  Commits the Database
244    * @param  x_return_status           Return Status of the Procedure.
245    * @param  x_msg_data                Stack of Error Messages.
246    * @param  x_msg_count               Number of Messages in the Stack.
247    * @param  p_trip_id                 Trip ID
248    * @param  p_object_version_number   Trip Object Version Number
249    * @param  p_available_hours         Available Hours in the Trip
250    * @param  p_upd_available_hours     Update Available Hours with value.
251    * @param  p_available_hours_before  Available Hours in the start of Trip.
252    * @param  p_available_hours_after   Available Hours at the end of Trip.
253    * @param  p_status                  (Not Used) New Status of the Trip.
254    *
255    * @see delete_trip                  Delete Trip API
256    **/
257   PROCEDURE update_trip(
258     p_api_version              IN          NUMBER
259   , p_init_msg_list            IN          VARCHAR2      DEFAULT NULL
260   , p_commit                   IN          VARCHAR2      DEFAULT NULL
261   , x_return_status           OUT  NOCOPY  VARCHAR2
262   , x_msg_data                OUT  NOCOPY  VARCHAR2
263   , x_msg_count               OUT  NOCOPY  NUMBER
264   , p_trip_id                  IN          NUMBER
265   , p_object_version_number    IN          NUMBER        DEFAULT NULL
266   , p_available_hours          IN          NUMBER        DEFAULT NULL
267   , p_upd_available_hours      IN          NUMBER        DEFAULT NULL
268   , p_available_hours_before   IN          NUMBER        DEFAULT NULL
269   , p_available_hours_after    IN          NUMBER        DEFAULT NULL
270   , p_status                   IN          NUMBER        DEFAULT NULL
271   );
272 
273   /**
274    * Fixes the passed Trip by pulling in all the valid Tasks into the Trip and
275    * removing Tasks which doesnt fall / linking tasks which fall within
276    * the Trip Boundary.
277    * <br>
278    * The API
279    *   1. Task Assignments
280    *      Finds all the Task Assignments which doesnt fall within the
281    *      Trip Start Time and (Trip End Time + Overtime) and can be linked
282    *      to another trip. If so, it removes the task from the Trip.
283    *      Then it goes and checks whether there are any valid candidatees
284    *      that can be made as part of the Trip.
285    *   2. Shift Tasks
286    *      Deletes any Duplicate Shift Task if present. If any of the Shift Task
287    *      is not there... it creates one.
288    *   3. Availability
289    *      Computes the correct availability of the Trip and updates it.
290    * <br>
291    * During the process of find valid eligible Task Assignments, it doesnt care if the
292    * Task Assignment is already part of another Trip (ie) Trip ID is already stamped in
293    * the Task Assignment. This is because, it is mandatory for two trips not to overlap
294    * anytime.
295    *
296    * @param  p_api_version             API Version (1.0)
297    * @param  p_init_msg_list           Initialize Message List
298    * @param  p_commit                  Commits the Database
299    * @param  x_return_status           Return Status of the Procedure.
300    * @param  x_msg_data                Stack of Error Messages.
301    * @param  x_msg_count               Number of Messages in the Stack.
302    * @param  p_trip_id                 Trip ID
303    *
304    **/
305   PROCEDURE fix_trip(
306     p_api_version            IN          NUMBER
307   , p_init_msg_list          IN          VARCHAR2 DEFAULT NULL
308   , p_commit                 IN          VARCHAR2 DEFAULT NULL
309   , x_return_status         OUT  NOCOPY  VARCHAR2
310   , x_msg_data              OUT  NOCOPY  VARCHAR2
311   , x_msg_count             OUT  NOCOPY  NUMBER
312   , p_trip_id                IN          NUMBER
313   , p_object_version_number  IN          NUMBER   DEFAULT NULL
314   );
315 
316   /**
317    * Processes the passed action on all the Trips falling between
318    * the two dates passed for the given Resource.
319    * Processes actions for a given Trip or for all Trips identified
320    * by the passed Resource List and the two dates.
321    * <br>
322    * Either P_TRIP_ID has to be passed or the list of Resources along
323    * with Start Date and End Date has to tbe passed for the API to
324    * do something.
325    * <br>
326    * Action to be performed by the API on the Trips is identified
327    * by P_TRIP_ACTION which takes values as given in the following table
328    *
329    *  --------------------------------------------------------------
330    *  |    Operation      |    Identifier            |  Value      |
331    *  --------------------------------------------------------------
332    *  |  Create Trips     |  g_action_create_trip    |  ADD        |
333    *  |  Delete Trips     |  g_action_delete_trip    |  DELETE     |
334    *  |  Fix Trips        |  g_action_fix_trip       |  FIX        |
335    *  |  Block Trips      |  g_action_block_trip     |  BLOCK      |
336    *  |  Unblock Trips    |  g_action_unblock_trip   |  UNBLOCK    |
337    *  |  Upgrade Trips    |  g_action_upgrade_trip   |  UPGRADE    |
338    *  |  Replace Trips    |  g_action_replace_trip   |  REPLACE    |
339    *  --------------------------------------------------------------
340    *
341    * <br>
342    * In case of Block Trip and Unblock Trip, the tasks forming part of
343    * the Trip will also be affected by the action. The eligible Tasks
344    * are those which doesnt have Actuals entered or which are not
345    * interrupted. The status of the task will move from Planned to
346    * Blocked Planned and Assigned to Blocked Assigned or vice versa depending
347    * on the action of the Trip.
348    * <br>
349    * The actions ADD (Create Trips) and REPLACE (Replace Trips) accept only
350    * one resource currently in the table of resources passed.
351    *
352    * @param  p_api_version             API Version (1.0)
353    * @param  p_init_msg_list           Initialize Message List  (Optional)
354    * @param  p_commit                  Commits the Database  (Optional)
355    * @param  x_return_status           Return Status of the Procedure.
356    * @param  x_msg_data                Stack of Error Messages.
357    * @param  x_msg_count               Number of Messages in the Stack.
358    * @param  p_action                  Action to be performed on the Trip.
359    * @param  p_trip_id                 Trip to be processed. (Optional)
360    * @param  p_resource_tbl            Table of Resources. (Optional)
361    * @param  p_start_date              Start Date. (Optional)
362    * @param  p_end_date                End Date. (Optional)
363    **/
364   PROCEDURE process_action(
365     p_api_version             IN          NUMBER
366   , p_init_msg_list           IN          VARCHAR2                           DEFAULT NULL
367   , p_commit                  IN          VARCHAR2                           DEFAULT NULL
368   , x_return_status          OUT  NOCOPY  VARCHAR2
369   , x_msg_data               OUT  NOCOPY  VARCHAR2
370   , x_msg_count              OUT  NOCOPY  NUMBER
371   , p_action                  IN          VARCHAR2
372   , p_trip_id                 IN          NUMBER                             DEFAULT NULL
373   , p_resource_tbl            IN          csf_resource_pub.resource_tbl_type DEFAULT NULL
374   , p_shift_type              IN         VARCHAR2                            DEFAULT NULL
375   , p_start_date              IN          DATE                               DEFAULT NULL
376   , p_end_date                IN          DATE                               DEFAULT NULL
377   );
378 
379   /**
380    * "Generate Trips Concurrent Program" - Generates the Trip Records for
381    * the Resources under the current User or for the passed Resource.
382    * <br>
383    * This is the Generate Trips concurrent program and the API generates
384    * the Trips records for the passed Resource or for all Resources under
385    * all the Territories of the current User for the timespan given by
386    * the Start and End Dates.
387    * This Concurrent Program can be run in follwing Modes.
388    * 1. Add     - Creates new Trips Records. <br>
389    * 2. Delete  - Deletes existing Trip Records. <br>
390    * 3. Replace - Deletes existing Trip Records and creates new ones. <br>
391    * 4. Fix     - Fixes existing Trip Records to be proper. <br>
392    * 5. Upgrade - Upgrades the current Shift Task Model to Trips Model.
393    * <br>
394    * Default Values: <br>
395    * a. Default Action is ADD (Given in the Concurrent Program Definition). <br>
396    * b. Default Start Date is SYSDATE. <br>
397    * c. Default End Date is (Start Date + Plan Scope). <br>
398    * d. Default Resource is NULL - All Resources under the User. <br>
399    * <br>
400    *
401    * @param  errbuf                    Standard Concurrent Program Output Parameter
402    * @param  retcode                   Standard Concurrent Program Output Parameter
403    * @param  p_action                  Action to be accomplished by the CP.
404    * @param  p_start_date              Start Date for the Action.
405    * @param  p_num_days                Number of Days.
406    * @param  p_resource_type           Resource Type for whom GTR has to be run
407    * @param  p_resource_id             Resource ID for whom GTR has to be run
408    **/
409   PROCEDURE generate_trips(
410     errbuf           OUT    NOCOPY    VARCHAR2
411   , retcode          OUT    NOCOPY    VARCHAR2
412   , p_action          IN              VARCHAR2
413   , p_start_date      IN              VARCHAR2
414   , p_num_days        IN              NUMBER
415   , p_resource_type   IN              VARCHAR2
416   , p_resource_id     IN              NUMBER
417   , p_shift_type      IN              VARCHAR2 DEFAULT NULL
418   , p_res_shift_add   IN              VARCHAR2 DEFAULT NULL
419   );
420 
421   PROCEDURE optimize_across_trips(
422     p_api_version             IN          NUMBER
423   , p_init_msg_list           IN          VARCHAR2                           DEFAULT NULL
424   , p_commit                  IN          VARCHAR2                           DEFAULT NULL
425   , x_return_status          OUT  NOCOPY  VARCHAR2
426   , x_msg_data               OUT  NOCOPY  VARCHAR2
427   , x_msg_count              OUT  NOCOPY  NUMBER
428   , x_conc_request_id        OUT  NOCOPY  NUMBER
429   , p_resource_tbl            IN          csf_requests_pvt.resource_tbl_type DEFAULT NULL
430   , p_start_date              IN          DATE                               DEFAULT NULL
431   , p_end_date                IN          DATE                               DEFAULT NULL
432   );
433 
434   PROCEDURE create_trip1(
435     p_api_version           IN          NUMBER
436   , p_init_msg_list         IN          VARCHAR2
437   , p_commit                IN          VARCHAR2
438   , x_return_status        OUT  NOCOPY  VARCHAR2
439   , x_msg_data             OUT  NOCOPY  VARCHAR2
440   , x_msg_count            OUT  NOCOPY  NUMBER
441   , p_resource_id           IN          NUMBER
442   , p_resource_type         IN          VARCHAR2
443   , p_start_date_time       IN          DATE
444   , p_end_date_time         IN          DATE
445   , p_schedule_detail_id    IN          NUMBER
446   , p_status                IN          NUMBER
447   , p_find_tasks            IN          VARCHAR2
448   , p_arr_party_site       IN          NUMBER
449   , p_arr_party            IN          NUMBER
450   , p_dep_party_site       IN          NUMBER
451   , p_dep_party            IN          NUMBER
452   , p_shift_type           IN          VARCHAR2
453   , x_trip_id              OUT  NOCOPY  NUMBER
454   );
455 
456     PROCEDURE new_trip1(
457     x_return_status        OUT  NOCOPY  VARCHAR2
458   , x_msg_data             OUT  NOCOPY  VARCHAR2
459   , x_msg_count            OUT  NOCOPY  NUMBER
460   , p_resource_id           IN          NUMBER
461   , p_resource_type         IN          VARCHAR2
462   , p_start_date_time       IN          DATE
463   , p_end_date_time         IN          DATE
464   , p_status                IN          NUMBER    DEFAULT NULL
465   , p_schedule_detail_id    IN          NUMBER    DEFAULT NULL
466   , p_find_tasks            IN          VARCHAR2  DEFAULT NULL
467   , p_dep_task_id           IN          NUMBER    DEFAULT NULL
468   , p_arr_task_id           IN          NUMBER    DEFAULT NULL
469   , p_arr_party_site       IN          NUMBER
470   , p_arr_party            IN          NUMBER
471   , p_dep_party_site       IN          NUMBER
472   , p_dep_party            IN          NUMBER
473    , p_shift_type           IN          VARCHAR2
474   , x_trip                 OUT  NOCOPY  trip_rec_type
475   );
476       PROCEDURE create_shift_tasks1(
477     p_api_version          IN          NUMBER
478   , p_init_msg_list        IN          VARCHAR2 DEFAULT NULL
479   , p_commit               IN          VARCHAR2 DEFAULT NULL
480   , x_return_status       OUT  NOCOPY  VARCHAR2
481   , x_msg_data            OUT  NOCOPY  VARCHAR2
482   , x_msg_count           OUT  NOCOPY  NUMBER
483   , p_resource_id          IN          NUMBER
484   , p_resource_type        IN          VARCHAR2
485   , p_start_date_time      IN          DATE
486   , p_end_date_time        IN          DATE
487   , p_create_dep_task      IN          BOOLEAN
488   , p_create_arr_task      IN          BOOLEAN
489   , p_arr_party_site       IN          NUMBER
490   , p_arr_party            IN          NUMBER
491   , p_dep_party_site       IN          NUMBER
492   , p_dep_party            IN          NUMBER
493   , x_dep_task_id         OUT NOCOPY   NUMBER
494   , x_arr_task_id         OUT NOCOPY   NUMBER
495   );
496 
497    PROCEDURE create_trips(
498     x_return_status        OUT  NOCOPY  VARCHAR2
499   , x_msg_data             OUT  NOCOPY  VARCHAR2
500   , x_msg_count            OUT  NOCOPY  NUMBER
501   , p_resource_tbl          IN          csf_resource_pub.resource_tbl_type
502   , p_start_date            IN          DATE
503   , p_end_date              IN          DATE
504   , p_shift_type            IN          VARCHAR2   DEFAULT NULL
505   , p_delete_trips          IN          BOOLEAN    DEFAULT FALSE
506   );
507 
508   PROCEDURE update_dc_trip(
509     p_api_version              IN          NUMBER
510   , p_init_msg_list            IN          VARCHAR2
511   , p_commit                   IN          VARCHAR2
512   , x_return_status           OUT  NOCOPY  VARCHAR2
513   , x_msg_data                OUT  NOCOPY  VARCHAR2
514   , x_msg_count               OUT  NOCOPY  NUMBER
515   , p_trip_id                  IN          NUMBER
516   , p_object_version_number    IN          NUMBER
517   , p_available_hours          IN          NUMBER
518   , p_upd_available_hours      IN          NUMBER
519   , p_available_hours_before   IN          NUMBER
520   , p_available_hours_after    IN          NUMBER
521   , p_status                   IN          NUMBER
522   , p_availability_type        in varchar2 default null
523   , p_start_date_time           in date
524   , p_end_date_time           in date
525   );
526    PROCEDURE update_shift_tasks(
527     p_api_version          IN          NUMBER
528   , p_init_msg_list        IN          VARCHAR2 DEFAULT NULL
529   , p_commit               IN          VARCHAR2 DEFAULT NULL
530   , p_object_version_number in out nocopy number
531   , p_task_id              IN          NUMBER
532   , p_Task_type_id         IN          NUMBER
533   , x_return_status       OUT  NOCOPY  VARCHAR2
534   , x_msg_data            OUT  NOCOPY  VARCHAR2
535   , x_msg_count           OUT  NOCOPY  NUMBER
536   , p_resource_id          IN          NUMBER
537   , p_resource_type        IN          VARCHAR2
538   , p_start_date_time      IN          DATE
539   , p_end_date_time        IN          DATE
540   , p_arr_party_site       IN          NUMBER
541   , p_arr_party            IN          NUMBER
542   , p_dep_party_site       IN          NUMBER
543   , p_dep_party            IN          NUMBER
544   , p_update_dep_task      IN          BOOLEAN  default null
545   , p_update_arr_task      IN          BOOLEAN  default null
546   );
547 
548   PROCEDURE create_dc_trip( p_api_version           IN          NUMBER
549                           , p_init_msg_list         IN          VARCHAR2
550                           , p_commit                IN          VARCHAR2
551                           , x_return_status        OUT  NOCOPY  VARCHAR2
552                           , x_msg_data             OUT  NOCOPY  VARCHAR2
553                           , x_msg_count            OUT  NOCOPY  NUMBER
554                           , p_resource_tbl          IN          csf_resource_pub.resource_tbl_type
555                           , p_start_date            IN          DATE
556                           , p_end_date              IN          DATE
557                           , p_delete_trips          IN          BOOLEAN    DEFAULT FALSE);
558 
559 END csf_trips_pub;
560 
561 
562