37: -- MIDPOINT_BACKWARDS CONSTANT NUMBER := 8;
38: -- CURRENT_OP CONSTANT NUMBER := 9;
39: -- CURRENT_SUB_GRP CONSTANT NUMBER := 11;
40: --
41: -- - If p_scheduleMode = WIP_CONSTANTS.CURRENT_OP,
42: -- p_opSeqNum must be given, only operation
43: -- p_opSeqNum will be scheduled
44: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT,
45: -- p_opSeqNum must be given, all the current and
40: --
41: -- - If p_scheduleMode = WIP_CONSTANTS.CURRENT_OP,
42: -- p_opSeqNum must be given, only operation
43: -- p_opSeqNum will be scheduled
44: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT,
45: -- p_opSeqNum must be given, all the current and
46: -- future operations will be scheduled
47: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_FORWARDS,
48: -- p_opSeqNum must be given, all operations after and
43: -- p_opSeqNum will be scheduled
44: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT,
45: -- p_opSeqNum must be given, all the current and
46: -- future operations will be scheduled
47: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_FORWARDS,
48: -- p_opSeqNum must be given, all operations after and
49: -- include p_opSeqNum will be scheduled
50: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_BACKWARDS,
51: -- p_opSeqNum must be given, all operations before and
46: -- future operations will be scheduled
47: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_FORWARDS,
48: -- p_opSeqNum must be given, all operations after and
49: -- include p_opSeqNum will be scheduled
50: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_BACKWARDS,
51: -- p_opSeqNum must be given, all operations before and
52: -- include p_opSeqNum will be scheduled
53: -- - If p_scheduleMode = WIP_CONSTANTS.CURRENT_SUB_GRP,
54: -- p_opSeqNum and p_resSeqNum must be given, only
49: -- include p_opSeqNum will be scheduled
50: -- - If p_scheduleMode = WIP_CONSTANTS.MIDPOINT_BACKWARDS,
51: -- p_opSeqNum must be given, all operations before and
52: -- include p_opSeqNum will be scheduled
53: -- - If p_scheduleMode = WIP_CONSTANTS.CURRENT_SUB_GRP,
54: -- p_opSeqNum and p_resSeqNum must be given, only
55: -- resources with the same (substitute_group_number,
56: -- replacement_group_number) as this resource will be
57: -- scheduled
105: e_invalid_mode exception;
106:
107: begin
108:
109: if (l_logLevel <= wip_constants.trace_logging) then
110: l_params(1).paramName := 'p_wipEntityID';
111: l_params(1).paramValue := p_wipEntityID;
112:
113: wip_logger.entryPoint(
120: end if;
121: x_returnStatus := fnd_api.g_ret_sts_success;
122:
123: -- do validation here
124: if (l_logLevel <= wip_constants.full_logging) then
125: wip_logger.log('validate parameters p_scheduleMode...', l_retStatus);
126: end if;
127: if p_scheduleMode NOT IN (
128: WIP_CONSTANTS.MIDPOINT,
124: if (l_logLevel <= wip_constants.full_logging) then
125: wip_logger.log('validate parameters p_scheduleMode...', l_retStatus);
126: end if;
127: if p_scheduleMode NOT IN (
128: WIP_CONSTANTS.MIDPOINT,
129: WIP_CONSTANTS.MIDPOINT_FORWARDS,
130: WIP_CONSTANTS.MIDPOINT_BACKWARDS,
131: WIP_CONSTANTS.CURRENT_OP,
132: --WIP_CONSTANTS.CURRENT_OP_RES
125: wip_logger.log('validate parameters p_scheduleMode...', l_retStatus);
126: end if;
127: if p_scheduleMode NOT IN (
128: WIP_CONSTANTS.MIDPOINT,
129: WIP_CONSTANTS.MIDPOINT_FORWARDS,
130: WIP_CONSTANTS.MIDPOINT_BACKWARDS,
131: WIP_CONSTANTS.CURRENT_OP,
132: --WIP_CONSTANTS.CURRENT_OP_RES
133: WIP_CONSTANTS.CURRENT_SUB_GRP )
126: end if;
127: if p_scheduleMode NOT IN (
128: WIP_CONSTANTS.MIDPOINT,
129: WIP_CONSTANTS.MIDPOINT_FORWARDS,
130: WIP_CONSTANTS.MIDPOINT_BACKWARDS,
131: WIP_CONSTANTS.CURRENT_OP,
132: --WIP_CONSTANTS.CURRENT_OP_RES
133: WIP_CONSTANTS.CURRENT_SUB_GRP )
134: then
127: if p_scheduleMode NOT IN (
128: WIP_CONSTANTS.MIDPOINT,
129: WIP_CONSTANTS.MIDPOINT_FORWARDS,
130: WIP_CONSTANTS.MIDPOINT_BACKWARDS,
131: WIP_CONSTANTS.CURRENT_OP,
132: --WIP_CONSTANTS.CURRENT_OP_RES
133: WIP_CONSTANTS.CURRENT_SUB_GRP )
134: then
135: raise e_invalid_mode;
128: WIP_CONSTANTS.MIDPOINT,
129: WIP_CONSTANTS.MIDPOINT_FORWARDS,
130: WIP_CONSTANTS.MIDPOINT_BACKWARDS,
131: WIP_CONSTANTS.CURRENT_OP,
132: --WIP_CONSTANTS.CURRENT_OP_RES
133: WIP_CONSTANTS.CURRENT_SUB_GRP )
134: then
135: raise e_invalid_mode;
136: end if;
129: WIP_CONSTANTS.MIDPOINT_FORWARDS,
130: WIP_CONSTANTS.MIDPOINT_BACKWARDS,
131: WIP_CONSTANTS.CURRENT_OP,
132: --WIP_CONSTANTS.CURRENT_OP_RES
133: WIP_CONSTANTS.CURRENT_SUB_GRP )
134: then
135: raise e_invalid_mode;
136: end if;
137:
135: raise e_invalid_mode;
136: end if;
137:
138: -- call private API
139: if (l_logLevel <= wip_constants.full_logging) then
140: wip_logger.log('scheduling lot based job...', l_retStatus);
141: end if;
142: wsm_infinite_scheduler_pvt.schedule(
143: p_initMsgList => p_initMsgList,
159:
160: when e_invalid_mode then
161: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
162: x_errorMsg := 'p_scheduleMode = ' || p_scheduleMode || ' is not supported';
163: if (l_logLevel <= wip_constants.trace_logging) then
164: wip_logger.exitPoint(
165: p_procName => 'wsm_infinite_scheduler_grp.schedule',
166: p_procReturnStatus => x_returnStatus,
167: p_msg => 'error: ' || x_errorMsg,
175: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
176: wip_utilities.get_message_stack(
177: p_msg => x_errorMsg,
178: p_delete_stack => fnd_api.g_false);
179: if (l_logLevel <= wip_constants.trace_logging) then
180: wip_logger.exitPoint(
181: p_procName => 'wsm_infinite_scheduler_grp.schedule',
182: p_procReturnStatus => x_returnStatus,
183: p_msg => 'error: ' || x_errorMsg,
195: p_error_text => SQLERRM);
196: wip_utilities.get_message_stack(
197: p_msg => x_errorMsg,
198: p_delete_stack => fnd_api.g_false);
199: if (l_logLevel <= wip_constants.trace_logging) then
200: wip_logger.exitPoint(
201: p_procName => 'wsm_infinite_scheduler_grp.schedule',
202: p_procReturnStatus => x_returnStatus,
203: p_msg => 'unexp error: ' || x_errorMsg,