DBA Data[Home] [Help]

APPS.FND_OAM_DSCRAM_UNITS_PKG dependencies on FND_API

Line 141: x_return_status := FND_API.G_RET_STS_ERROR;

137: l_workers_allowed NUMBER(15);
138: l_workers_assigned NUMBER(15);
139: BEGIN
140: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
141: x_return_status := FND_API.G_RET_STS_ERROR;
142: x_return_msg := '';
143:
144: --handle closing/opening the cursor as necessary depending on p_requery
145: IF p_requery OR

Line 224: x_return_status := FND_API.G_RET_STS_SUCCESS;

220: b_last_fetched_unit_phase := l_phase;
221:
222: --success
223: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
224: x_return_status := FND_API.G_RET_STS_SUCCESS;
225: EXCEPTION
226: WHEN OTHERS THEN
227: IF B_UNITS%ISOPEN THEN
228: CLOSE B_UNITS;

Line 232: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

228: CLOSE B_UNITS;
229: END IF;
230: x_return_msg := 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
231: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
232: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
233: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
234: END;
235:
236: -- Private

Line 257: x_return_status := FND_API.G_RET_STS_ERROR;

253: FROM fnd_oam_dscram_units
254: WHERE unit_id = p_unit_id;
255: BEGIN
256: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
257: x_return_status := FND_API.G_RET_STS_ERROR;
258: x_return_msg := '';
259:
260: -- automatically valid if unit_id same as last fetched
261: IF p_unit_id = b_last_fetched_unit_id THEN

Line 262: x_return_status := FND_API.G_RET_STS_SUCCESS;

258: x_return_msg := '';
259:
260: -- automatically valid if unit_id same as last fetched
261: IF p_unit_id = b_last_fetched_unit_id THEN
262: x_return_status := FND_API.G_RET_STS_SUCCESS;
263: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
264: RETURN TRUE;
265: END IF;
266:

Line 292: x_return_status := FND_API.G_RET_STS_SUCCESS;

288: END IF;
289:
290: --success
291: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
292: x_return_status := FND_API.G_RET_STS_SUCCESS;
293: RETURN TRUE;
294: EXCEPTION
295: WHEN OTHERS THEN
296: x_return_msg := 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';

Line 298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

294: EXCEPTION
295: WHEN OTHERS THEN
296: x_return_msg := 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
297: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
299: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
300: RETURN FALSE;
301: END;
302:

Line 325: x_return_status := FND_API.G_RET_STS_ERROR;

321: SELECT unit_status
322: FROM fnd_oam_dscram_units
323: WHERE unit_id = b_unit_info.unit_id;
324: BEGIN
325: x_return_status := FND_API.G_RET_STS_ERROR;
326: x_return_msg := '';
327:
328: -- make sure the state's initialized
329: IF NOT b_unit_info.initialized THEN

Line 364: x_return_status := FND_API.G_RET_STS_SUCCESS;

360: fnd_oam_debug.log(1, l_ctxt, x_return_msg);
361: END IF;
362: RETURN FALSE;
363: END IF;
364: x_return_status := FND_API.G_RET_STS_SUCCESS;
365: ELSE
366: x_return_status := b_unit_info.last_validation_ret_sts;
367: END IF;
368:

Line 386: RETURN (x_return_status = FND_API.G_RET_STS_SUCCESS);

382:
383: --success
384: b_unit_info.last_validation_ret_sts := x_return_status;
385: b_unit_info.last_validated := SYSDATE;
386: RETURN (x_return_status = FND_API.G_RET_STS_SUCCESS);
387: EXCEPTION
388: WHEN OTHERS THEN
389: x_return_msg := 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
390: fnd_oam_debug.log(6, l_ctxt, x_return_msg);

Line 391: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

387: EXCEPTION
388: WHEN OTHERS THEN
389: x_return_msg := 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
390: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
391: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
392: b_unit_info.last_validation_ret_sts := x_return_status;
393: b_unit_info.last_validated := SYSDATE;
394: RETURN FALSE;
395: END;

Line 429: x_return_status := FND_API.G_RET_STS_ERROR;

425:
426: l_status VARCHAR2(30) := NULL;
427: BEGIN
428: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
429: x_return_status := FND_API.G_RET_STS_ERROR;
430: x_return_msg := '';
431:
432: -- Do a locking select without a pre-select since we always have to update the unit
433: -- row to add to the # of workers assigned. Also updates the status to started if it

Line 487: (l_suggest_disable_splitting = FND_API.G_TRUE)) THEN

483: --execute in parallel with earlier ones unless we're using the AD parallization infrastructure where they
484: --all execute at once on a chunk of rows.
485: IF ((l_weight IS NOT NULL AND
486: l_weight < FND_OAM_DSCRAM_BUNDLES_PKG.GET_MIN_PARALLEL_UNIT_WEIGHT) OR
487: (l_suggest_disable_splitting = FND_API.G_TRUE)) THEN
488: fnd_oam_debug.log(1, l_ctxt, 'Small unit or forced disable splitting, using Serial Execution.');
489:
490: -- don't overwrite the actual values if they've been set by a previous start, don't want to change state after
491: -- we've already set it..

Line 493: l_actual_disable_splitting := NVL(l_actual_disable_splitting, FND_API.G_TRUE);

489:
490: -- don't overwrite the actual values if they've been set by a previous start, don't want to change state after
491: -- we've already set it..
492: l_actual_workers_allowed := NVL(l_actual_workers_allowed, 1);
493: l_actual_disable_splitting := NVL(l_actual_disable_splitting, FND_API.G_TRUE);
494: END IF;
495:
496: --set to suggested if still no value
497: l_actual_workers_allowed := NVL(l_actual_workers_allowed, l_suggest_workers_allowed); --acceptable to push a NULL

Line 498: l_actual_disable_splitting := NVL(l_actual_disable_splitting, NVL(l_suggest_disable_splitting, FND_API.G_FALSE));

494: END IF;
495:
496: --set to suggested if still no value
497: l_actual_workers_allowed := NVL(l_actual_workers_allowed, l_suggest_workers_allowed); --acceptable to push a NULL
498: l_actual_disable_splitting := NVL(l_actual_disable_splitting, NVL(l_suggest_disable_splitting, FND_API.G_FALSE));
499:
500: -- update the status and other fields
501: UPDATE fnd_oam_dscram_units
502: SET unit_status = FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_PROCESSING,

Line 503: stats_finished = FND_API.G_FALSE,

499:
500: -- update the status and other fields
501: UPDATE fnd_oam_dscram_units
502: SET unit_status = FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_PROCESSING,
503: stats_finished = FND_API.G_FALSE,
504: actual_workers_allowed = l_actual_workers_allowed,
505: actual_disable_splitting = l_actual_disable_splitting
506: WHERE unit_id = p_unit_id;
507: ELSE

Line 548: x_return_status := FND_API.G_RET_STS_SUCCESS;

544: --invalidate the last fetched unit since we just changed its state, we'll requery next time anyway
545: b_last_fetched_unit_id := NULL;
546: b_last_fetched_unit_phase := NULL;
547:
548: x_return_status := FND_API.G_RET_STS_SUCCESS;
549: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
550: EXCEPTION
551: WHEN OTHERS THEN
552: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 552: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

548: x_return_status := FND_API.G_RET_STS_SUCCESS;
549: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
550: EXCEPTION
551: WHEN OTHERS THEN
552: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
553: x_return_msg := 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
554: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
555: ROLLBACK;
556: fnd_oam_debug.log(2, l_ctxt, 'EXIT');

Line 611: l_proposed_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

607: BEGIN
608: --if we're the last worker and we think all work suceeded so far, update the un-set, writable args of all completed
609: --work items
610: IF l_workers_assigned = 1 AND
611: l_proposed_ret_sts = FND_API.G_RET_STS_SUCCESS THEN
612:
613: k := px_work_queue_to_complete.FIRST;
614: WHILE k IS NOT NULL LOOP
615: CASE px_work_queue_to_complete(k).item_type

Line 638: IF l_proposed_ret_sts <> FND_API.G_RET_STS_SUCCESS THEN

634: RAISE COMPLETE_FAILED;
635: END CASE;
636:
637: --if the called update method failed, exit early
638: IF l_proposed_ret_sts <> FND_API.G_RET_STS_SUCCESS THEN
639: l_proposed_status := FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_ERROR_UNKNOWN;
640: --store the failure message on the item
641: px_work_queue_to_complete(k).item_msg := l_return_msg||px_work_queue_to_complete(k).item_msg;
642: --stop processing the loop

Line 650: IF l_proposed_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

646: k := px_work_queue_to_complete.NEXT(k);
647: END LOOP;
648:
649: --see if the update worked
650: IF l_proposed_ret_sts = FND_API.G_RET_STS_SUCCESS THEN
651: --mark that the DESTROY__CACHE_ENTRY methods should update the context with values from each
652: --work item's arg list.
653: l_update_context := TRUE;
654: END IF;

Line 686: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

682: RAISE COMPLETE_FAILED;
683: END CASE;
684:
685: --check if the complete_ succeeded, stop processing if it did
686: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
687: RAISE COMPLETE_FAILED;
688: END IF;
689:
690: k := px_work_queue_to_complete.NEXT(k);

Line 696: IF l_proposed_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

692:
693: --only manually destroy the cache entities when the work item was successful, otherwise
694: --let the catch-all destroy_cache methods get it
695: fnd_oam_debug.log(1, l_ctxt, 'Proposed Unit(s) Ret Sts: '||l_proposed_ret_sts);
696: IF l_proposed_ret_sts = FND_API.G_RET_STS_SUCCESS THEN
697: --we don't need to clone the context here before execution because the run requires an explicit
698: --set_context to update the real context object.
699: k := px_work_queue_to_complete.FIRST;
700: WHILE k IS NOT NULL LOOP

Line 722: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

718:
719: --if destroy failed, log it in the unit, too late for the work item. don't keep executing
720: --destroys to keep dependent parts of the updated context from being rolled up without prior
721: --work items rolling up correctly. Catch-all destroy_cache methods will take care of cleanup.
722: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
723: l_message := l_return_msg;
724: RAISE COMPLETE_FAILED;
725: END IF;
726:

Line 734: l_proposed_ret_sts := FND_API.G_RET_STS_UNEXP_ERROR;

730: EXCEPTION
731: WHEN OTHERS THEN
732: --if anything went wrong while processing the work units, still complete the unit but with an error
733: l_proposed_status := FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_ERROR_UNKNOWN;
734: l_proposed_ret_sts := FND_API.G_RET_STS_UNEXP_ERROR;
735: END;
736: END IF;
737:
738: -- if specified, destroy the work item base caches to keep out leaks

Line 745: IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND

741: --destroy the DML cache
742: FND_OAM_DSCRAM_DMLS_PKG.DESTROY_DML_CACHE(px_arg_context,
743: l_return_status,
744: l_return_msg);
745: IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND
746: NOT FND_OAM_DSCRAM_UTILS_PKG.RUN_IS_NORMAL THEN
747: --only error when failing to destory if we're in a non-normal mode
748: l_message := l_return_msg;
749: RAISE COMPLETE_FAILED;

Line 756: IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND

752: --destroy the PLSQL cache
753: FND_OAM_DSCRAM_PLSQLS_PKG.DESTROY_PLSQL_CACHE(px_arg_context,
754: l_return_status,
755: l_return_msg);
756: IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND
757: NOT FND_OAM_DSCRAM_UTILS_PKG.RUN_IS_NORMAL THEN
758: --only error when failing to destory if we're in a non-normal mode
759: l_message := l_return_msg;
760: RAISE COMPLETE_FAILED;

Line 766: l_proposed_ret_sts := FND_API.G_RET_STS_UNEXP_ERROR;

762: EXCEPTION
763: WHEN OTHERS THEN
764: --if anything went wrong in the DMLs, still complete the unit, just differently
765: l_proposed_status := FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_ERROR_UNKNOWN;
766: l_proposed_ret_sts := FND_API.G_RET_STS_UNEXP_ERROR;
767: END;
768: END IF;
769:
770: -- translate the new_status into a valid final status

Line 830: x_final_ret_sts := FND_API.G_RET_STS_UNEXP_ERROR;

826:
827: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
828: EXCEPTION
829: WHEN OTHERS THEN
830: x_final_ret_sts := FND_API.G_RET_STS_UNEXP_ERROR;
831: fnd_oam_debug.log(6, l_ctxt, 'Unhandled Exception: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
832: --safety rollback
833: ROLLBACK;
834: fnd_oam_debug.log(2, l_ctxt, 'EXIT');

Line 872: x_return_status := FND_API.G_RET_STS_ERROR;

868: PRAGMA AUTONOMOUS_TRANSACTION;
869:
870: l_ctxt VARCHAR2(60) := PKG_NAME||'INITIALIZE_AD_SPLIT';
871: BEGIN
872: x_return_status := FND_API.G_RET_STS_ERROR;
873: x_return_msg := '';
874:
875: fnd_oam_debug.log(1, l_ctxt, 'Using owner.table: '||p_object_owner||'.'||p_object_name);
876:

Line 894: x_return_status := FND_API.G_RET_STS_SUCCESS;

890:
891: fnd_oam_debug.log(1, l_ctxt, 'Finished initialize.');
892:
893: -- no return code indicating whether it succeeded, exceptions are thrown
894: x_return_status := FND_API.G_RET_STS_SUCCESS;
895: EXCEPTION
896: WHEN OTHERS THEN
897: x_return_msg := 'Unit ID ('||p_unit_id||'), Failed to initialize the AD table splitting infrastructure: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
898: fnd_oam_debug.log(6, l_ctxt, x_return_msg);

Line 899: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

895: EXCEPTION
896: WHEN OTHERS THEN
897: x_return_msg := 'Unit ID ('||p_unit_id||'), Failed to initialize the AD table splitting infrastructure: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
898: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
899: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
900: ROLLBACK;
901: END;
902:
903: -- Private wrapper for the AD get next procedure. Autonomous to keep from

Line 915: x_return_status := FND_API.G_RET_STS_ERROR;

911: PRAGMA AUTONOMOUS_TRANSACTION;
912:
913: l_ctxt VARCHAR2(60) := PKG_NAME||'GET_NEXT_AD_RANGE';
914: BEGIN
915: x_return_status := FND_API.G_RET_STS_ERROR;
916: x_return_msg := '';
917:
918: fnd_oam_debug.log(1, l_ctxt, 'Getting next range...');
919:

Line 936: x_return_status := FND_API.G_RET_STS_SUCCESS;

932: x_rows_found := FALSE;
933: END IF;
934:
935: -- no return code indicating whether it succeeded, exceptions are thrown
936: x_return_status := FND_API.G_RET_STS_SUCCESS;
937: EXCEPTION
938: WHEN OTHERS THEN
939: x_return_msg := 'Failed to fetch next AD range: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
940: fnd_oam_debug.log(6, l_ctxt, x_return_msg);

Line 941: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

937: EXCEPTION
938: WHEN OTHERS THEN
939: x_return_msg := 'Failed to fetch next AD range: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))';
940: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
941: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
942: ROLLBACK;
943: END;
944:
945: -- Private wrapper for the AD complete procedure. This AD API also

Line 1002: x_return_status := FND_API.G_RET_STS_SUCCESS;

998: x_return_msg := '';
999:
1000: --if we've got no work, just return
1001: IF px_work_queue IS NULL OR px_work_queue.COUNT = 0 THEN
1002: x_return_status := FND_API.G_RET_STS_SUCCESS;
1003: fnd_oam_debug.log(1, l_ctxt, 'Work queue empty, returning success.');
1004: RETURN;
1005: END IF;
1006:

Line 1008: x_return_status := FND_API.G_RET_STS_ERROR;

1004: RETURN;
1005: END IF;
1006:
1007: --work to do, default the status
1008: x_return_status := FND_API.G_RET_STS_ERROR;
1009:
1010: --at this point either split the work using AD or execute the dmls directly
1011: IF b_unit_info.use_splitting THEN
1012: --default the work queue to complete to our input queue

Line 1023: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1019: b_unit_info.actual_workers_allowed,
1020: b_unit_info.batch_size,
1021: l_return_status,
1022: l_return_msg);
1023: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1024: x_return_status := l_return_status;
1025: x_return_msg := '[Error initializing AD Split]: '||l_return_msg;
1026: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
1027: --fnd_oam_debug.log(2, l_ctxt, 'EXIT');

Line 1053: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1049: l_rowid_ubound,
1050: l_rows_found,
1051: l_return_status,
1052: l_return_msg);
1053: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1054: x_return_status := l_return_status;
1055: x_return_msg := l_return_msg;
1056: --fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1057: RETURN;

Line 1102: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1098: --check if our work suceeded, if not we quick fail because AD can't
1099: --continue fetching ranges and we can't commit only some work items for a range.
1100: --Nothing needs to be done for the AD infrastructure, the block will be re-tried
1101: --automatically next time.
1102: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1103: ROLLBACK;
1104: x_return_status := l_return_status;
1105: --attach the failure message to the work item
1106: px_work_queue(k).item_msg := l_return_msg||px_work_queue(k).item_msg;

Line 1181: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

1177: RETURN;
1178: END CASE;
1179:
1180: --see if our work suceeded or not
1181: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1182: --destroy the work item's cache entry exp to get its arg list pushed into the arg context
1183: CASE px_work_queue(k).item_type
1184: WHEN FND_OAM_DSCRAM_UTILS_PKG.G_TYPE_DML THEN
1185: FND_OAM_DSCRAM_DMLS_PKG.DESTROY_DML_CACHE_ENTRY(px_work_queue(k).item_id,

Line 1201: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1197:
1198: END CASE;
1199:
1200: --see if the destroy worked
1201: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1202: ROLLBACK;
1203: x_return_status := l_return_status;
1204: --attach the failure message to the work item
1205: px_work_queue(k).item_msg := l_return_msg||px_work_queue(k).item_msg;

Line 1253: x_return_status := FND_API.G_RET_STS_SUCCESS;

1249: END IF;
1250:
1251: --if we got here, we're done.
1252:
1253: x_return_status := FND_API.G_RET_STS_SUCCESS;
1254: --fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1255: EXCEPTION
1256: WHEN OTHERS THEN
1257: -- include a safety rollback since this procedure calls other procedures that

Line 1260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1256: WHEN OTHERS THEN
1257: -- include a safety rollback since this procedure calls other procedures that
1258: -- leave results on the main transaction.
1259: ROLLBACK;
1260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1261: x_return_msg := 'Unhandled Exception: [Code('||SQLCODE||'), Message("'||SQLERRM||'")]';
1262: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
1263: --fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1264: END;

Line 1282: x_return_status := FND_API.G_RET_STS_ERROR;

1278: l_return_status VARCHAR2(6);
1279: l_return_msg VARCHAR2(2048);
1280: BEGIN
1281: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
1282: x_return_status := FND_API.G_RET_STS_ERROR;
1283: x_return_msg := '';
1284:
1285: --get the list of dmls as a work queue
1286: FND_OAM_DSCRAM_DMLS_PKG.FETCH_DML_IDS(b_unit_info.unit_id,

Line 1290: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1286: FND_OAM_DSCRAM_DMLS_PKG.FETCH_DML_IDS(b_unit_info.unit_id,
1287: l_work_queue,
1288: l_return_status,
1289: l_return_msg);
1290: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1291: x_return_status := l_return_status;
1292: x_return_msg := l_return_msg;
1293: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1294: RETURN;

Line 1308: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1304: --return status of the internal execute
1305: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1306: EXCEPTION
1307: WHEN OTHERS THEN
1308: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1309: x_return_msg := 'Unhandled Exception: [Code('||SQLCODE||'), Message("'||SQLERRM||'")]';
1310: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
1311: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1312: END;

Line 1330: x_return_status := FND_API.G_RET_STS_ERROR;

1326: l_return_status VARCHAR2(6);
1327: l_return_msg VARCHAR2(2048);
1328: BEGIN
1329: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
1330: x_return_status := FND_API.G_RET_STS_ERROR;
1331: x_return_msg := '';
1332:
1333: --get the list of plsqls as a work queue
1334: FND_OAM_DSCRAM_PLSQLS_PKG.FETCH_PLSQL_IDS(b_unit_info.unit_id,

Line 1338: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1334: FND_OAM_DSCRAM_PLSQLS_PKG.FETCH_PLSQL_IDS(b_unit_info.unit_id,
1335: l_work_queue,
1336: l_return_status,
1337: l_return_msg);
1338: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1339: x_return_status := l_return_status;
1340: x_return_msg := l_return_msg;
1341: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1342: RETURN;

Line 1355: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1351:
1352: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1353: EXCEPTION
1354: WHEN OTHERS THEN
1355: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1356: x_return_msg := 'Unhandled Exception: [Code('||SQLCODE||'), Message("'||SQLERRM||'")]';
1357: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
1358: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1359: END;

Line 1442: x_return_status := FND_API.G_RET_STS_ERROR;

1438: l_return_status VARCHAR2(6);
1439: l_return_msg VARCHAR2(2048);
1440: BEGIN
1441: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
1442: x_return_status := FND_API.G_RET_STS_ERROR;
1443: x_return_msg := '';
1444:
1445: --first we need to fetch the component units of this meta-unit
1446: SELECT unit_id, unit_type, priority

Line 1477: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1473: RETURN;
1474: END CASE;
1475:
1476: --see if the fetch suceeded, if not quick exit
1477: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1478: x_return_status := l_return_status;
1479: x_return_msg := l_return_msg;
1480: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1481: RETURN;

Line 1585: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1581:
1582: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1583: EXCEPTION
1584: WHEN OTHERS THEN
1585: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1586: x_return_msg := 'Unhandled Exception: [Code('||SQLCODE||'), Message("'||SQLERRM||'")]';
1587: fnd_oam_debug.log(6, l_ctxt, x_return_msg);
1588: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
1589: END;

Line 1608: x_return_status := FND_API.G_RET_STS_ERROR;

1604: l_return_msg VARCHAR2(2048);
1605: l_ignore VARCHAR2(2048);
1606: BEGIN
1607: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
1608: x_return_status := FND_API.G_RET_STS_ERROR;
1609: x_return_msg := '';
1610:
1611: --make sure the unit's ok to start execution
1612: IF NOT VALIDATE_START_EXECUTION(p_unit_id,

Line 1625: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1621: -- attempt to assign this invocation as a worker for the unit
1622: ASSIGN_WORKER_TO_UNIT(p_unit_id,
1623: l_return_status,
1624: l_return_msg);
1625: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1626: x_return_status := l_return_status;
1627: IF l_return_status <> FND_OAM_DSCRAM_UTILS_PKG.G_RET_STS_FULL THEN
1628: x_return_msg := '[Unit Worker Assignment Failed]:('||l_return_msg||')';
1629: fnd_oam_debug.log(1, l_ctxt, x_return_msg);

Line 1656: l_return_status := FND_API.G_RET_STS_SUCCESS;

1652: END IF;
1653:
1654: -- after assign we can start using stuff from the unit_info package state. First, we need to
1655: -- see what type of unit we've got so we delegate to the right subfunction.
1656: l_return_status := FND_API.G_RET_STS_SUCCESS;
1657: fnd_oam_debug.log(1, l_ctxt, 'Executing Unit...');
1658:
1659: -- for now, just use the arg context of the run for execution, later we may want to introduce
1660: -- a specific task context that layers on top of the run context that lets units communicate

Line 1694: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

1690: fnd_oam_debug.log(6, l_ctxt, l_return_msg);
1691: END CASE;
1692:
1693: --determine the status to apply to the unit from the execute's return status
1694: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1695: --unit was sucessful
1696: l_completed_status := FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_PROCESSED;
1697: ELSE
1698: --determine what status the unit should have

Line 1730: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1726: FND_OAM_DSCRAM_ARGS_PKG.PRINT_ARG_CONTEXT(l_arg_context);
1727: END IF;
1728:
1729: --if sucessfull, set the run arg context to our local context, can't modify object by reference
1730: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1731: FND_OAM_DSCRAM_RUNS_PKG.SET_RUN_ARG_CONTEXT(l_arg_context);
1732: END IF;
1733:
1734: fnd_oam_debug.log(2, l_ctxt, 'EXIT');

Line 1743: FND_API.G_RET_STS_UNEXP_ERROR,

1739: --safety rollback
1740: ROLLBACK;
1741: COMPLETE_UNIT_IN_ERROR(p_unit_id,
1742: FND_OAM_DSCRAM_UTILS_PKG.G_STATUS_ERROR_UNKNOWN,
1743: FND_API.G_RET_STS_UNEXP_ERROR,
1744: x_return_msg,
1745: x_return_status);
1746: END;
1747: