544: -- we're in, start pulling units and executing them.
545: <
546: LOOP
547: --get the next available task
548: FND_OAM_DSCRAM_UNITS_PKG.FETCH_NEXT_UNIT(TRUE,
549: l_unit_id,
550: l_return_status,
551: l_return_msg);
552: IF l_return_status = FND_OAM_DSCRAM_UTILS_PKG.G_RET_STS_EMPTY THEN
563: EXIT outer;
564: END IF;
565:
566: --execute the unit
567: FND_OAM_DSCRAM_UNITS_PKG.EXECUTE_UNIT(l_unit_id,
568: l_return_status,
569: l_return_msg);
570: IF l_return_status = FND_OAM_DSCRAM_UTILS_PKG.G_RET_STS_FULL THEN
571: --If we got past the fetch but the execute found it full, continue
571: --If we got past the fetch but the execute found it full, continue
572: --fetching.
573: <
574: LOOP
575: FND_OAM_DSCRAM_UNITS_PKG.FETCH_NEXT_UNIT(FALSE,
576: l_unit_id,
577: l_return_status,
578: l_return_msg);
579: IF l_return_status IN (FND_OAM_DSCRAM_UTILS_PKG.G_RET_STS_EMPTY,
589: EXIT outer;
590: END IF;
591:
592: -- try to execute this unit
593: FND_OAM_DSCRAM_UNITS_PKG.EXECUTE_UNIT(l_unit_id,
594: l_return_status,
595: l_return_msg);
596: IF l_return_status = FND_OAM_DSCRAM_UTILS_PKG.G_RET_STS_FULL THEN
597: --continue to the next inner loop iteration for the next fetch