1 package wsm_infinite_scheduler_pvt as
2 /* $Header: WSMVIFSS.pls 120.1 2005/06/05 21:48:16 appldev $ */
3
4 -------------------------------------------------------------------------
5 -- This private procedure will schedule a lot based job based on
6 -- resources usages, assuming infinite resource availibility. It will
7 -- read job/schedule information out of the relevant database tables,
8 -- schedule them based on input parameters, and then update the schedule
9 -- dates in WO, WOR, WCO, WCOR
10 -- OSFM scheduler will only schedule current and future operations
11 -- All the completed operations will not be re-scheduled
12 --
13 -- Parameters:
14 -- + p_initMsgList: Clear the message stack before processing?
15 -- True (fnd_api.g_true) should be passed
16 -- unless relevant messages are being saved
17 -- on the stack. This value defaults to true.
18 --
19 -- + p_endDebug: Pass true (fnd_api.g_true) unless the
20 -- debug session will be ended at a later
21 -- point by the caller. This value defaults
22 -- to true
23 --
24 -- + p_orgID: The organization of the entity.
25 --
26 -- + p_wipEntityID: The entity to reschedule.
27 --
28 -- + p_scheduleMode: will have the following values
29 --
30 -- FORWARDS CONSTANT NUMBER := 1;
31 -- BACKWARDS CONSTANT NUMBER := 4;
32 -- MIDPOINT CONSTANT NUMBER := 6;
33 -- MIDPOINT_FORWARDS CONSTANT NUMBER := 7;
34 -- MIDPOINT_BACKWARDS CONSTANT NUMBER := 8;
35 -- CURRENT_OP CONSTANT NUMBER := 9;
36 -- CURRENT_SUB_GRP CONSTANT NUMBER := 11;
37 --
38 -- - If p_scheduleMode = WIP_CONSTANTS.CURRENT_OP,
39 -- p_opSeqNum must be given, only operation
40 -- p_opSeqNum will be scheduled
41 -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT,
42 -- p_opSeqNum must be given, all the current and
43 -- future operations will be scheduled
44 -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_FORWARDS,
45 -- p_opSeqNum must be given, all operations after and
46 -- include p_opSeqNum will be scheduled
47 -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_BACKWARDS,
48 -- p_opSeqNum must be given, all operations before and
49 -- include p_opSeqNum will be scheduled
50 -- - If p_scheduleMode = WIP_CONSTANTS.CURRENT_SUB_GRP,
51 -- p_opSeqNum and p_resSeqNum must be given, only
52 -- resources with the same (substitute_group_number,
53 -- replacement_group_number) as this resource will be
54 -- scheduled
55 -- - If p_scheduleMode = WIP_CONSTANTS.FORWARDS, all the
56 -- current and future operations will be forward
57 -- scheduled,
58 -- p_startDate must be given
59 -- - If p_scheduleMode = WIP_CONSTANTS.BACKWARDS, all the
60 -- current and future operations will be backward
61 -- scheduled,
62 -- p_endDate must be given
63 --
64 -- + p_startDate: The start anchor date of either the operation
65 -- or resource.
66 --
67 -- + p_endDate: The end anchor date of either the operation
68 -- or resource.
69 --
70 -- + p_opSeqNum: Populate to midpoint schedule.
71 -- Should be negative if passing current job op_seq_num,
72 -- should be possitive if passing routing op_seq_num
73 --
74 -- + p_resSeqNum: Populate to midpoint schedule down to the resource
75 -- level, only used if p_opSeqNum is populated.
76 -- pass -JOB_OP_SEQ_NUM if it is the current op
77 --
78 -- + x_returnStatus:fnd_api.g_ret_sts_success if the entity
79 -- was scheduled successfully.
80 --
81 -- + x_errorMsg: The error message. The error message will also
82 -- be left on the stack.
83 -------------------------------------------------------------------------
84
85 procedure schedule(
86 p_initMsgList in varchar2 := null,
87 p_endDebug in varchar2 := null,
88 p_orgID in number,
89 p_wipEntityID in number,
90 p_scheduleMode in number := null,
91 p_startDate in date := null,
92 p_endDate in date := null,
93 p_opSeqNum in number := null, -- -1 if it is the current op
94 p_resSeqNum in number := null,
95 p_scheQuantity in number := null,
96 x_returnStatus out nocopy varchar2,
97 x_errorMsg out nocopy varchar2,
98 --OPTII-PER:Added the following arguments
99 p_charges_exist in number default NULL,
100 p_new_job in number default NULL);
101
102 end wsm_infinite_scheduler_pvt;