408: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
409: -- Debug level set correctly, output debug information for
410: -- specific formula.
411:
412: hr_utility.trace('');
413: hr_utility.trace('FMLA CACHE info for formula_id ' || fid);
414: hr_utility.trace('--------------------------------------');
415: fmla_info := p_fmla_info(p_fmla_lookups(fid));
416: hr_utility.trace('Eff Start : ' ||
409: -- Debug level set correctly, output debug information for
410: -- specific formula.
411:
412: hr_utility.trace('');
413: hr_utility.trace('FMLA CACHE info for formula_id ' || fid);
414: hr_utility.trace('--------------------------------------');
415: fmla_info := p_fmla_info(p_fmla_lookups(fid));
416: hr_utility.trace('Eff Start : ' ||
417: to_char(fmla_info.effective_start_date, 'DD-MON-YYYY'));
410: -- specific formula.
411:
412: hr_utility.trace('');
413: hr_utility.trace('FMLA CACHE info for formula_id ' || fid);
414: hr_utility.trace('--------------------------------------');
415: fmla_info := p_fmla_info(p_fmla_lookups(fid));
416: hr_utility.trace('Eff Start : ' ||
417: to_char(fmla_info.effective_start_date, 'DD-MON-YYYY'));
418: hr_utility.trace('Eff End : ' ||
412: hr_utility.trace('');
413: hr_utility.trace('FMLA CACHE info for formula_id ' || fid);
414: hr_utility.trace('--------------------------------------');
415: fmla_info := p_fmla_info(p_fmla_lookups(fid));
416: hr_utility.trace('Eff Start : ' ||
417: to_char(fmla_info.effective_start_date, 'DD-MON-YYYY'));
418: hr_utility.trace('Eff End : ' ||
419: to_char(fmla_info.effective_end_date, 'DD-MON-YYYY'));
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
414: hr_utility.trace('--------------------------------------');
415: fmla_info := p_fmla_info(p_fmla_lookups(fid));
416: hr_utility.trace('Eff Start : ' ||
417: to_char(fmla_info.effective_start_date, 'DD-MON-YYYY'));
418: hr_utility.trace('Eff End : ' ||
419: to_char(fmla_info.effective_end_date, 'DD-MON-YYYY'));
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
416: hr_utility.trace('Eff Start : ' ||
417: to_char(fmla_info.effective_start_date, 'DD-MON-YYYY'));
418: hr_utility.trace('Eff End : ' ||
419: to_char(fmla_info.effective_end_date, 'DD-MON-YYYY'));
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
417: to_char(fmla_info.effective_start_date, 'DD-MON-YYYY'));
418: hr_utility.trace('Eff End : ' ||
419: to_char(fmla_info.effective_end_date, 'DD-MON-YYYY'));
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
425: hr_utility.trace('In count : ' || fmla_info.input_count);
418: hr_utility.trace('Eff End : ' ||
419: to_char(fmla_info.effective_end_date, 'DD-MON-YYYY'));
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
425: hr_utility.trace('In count : ' || fmla_info.input_count);
426: hr_utility.trace('Out count : ' || fmla_info.output_count);
419: to_char(fmla_info.effective_end_date, 'DD-MON-YYYY'));
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
425: hr_utility.trace('In count : ' || fmla_info.input_count);
426: hr_utility.trace('Out count : ' || fmla_info.output_count);
427:
420: hr_utility.trace('Fmla Name : ' || fmla_info.formula_name);
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
425: hr_utility.trace('In count : ' || fmla_info.input_count);
426: hr_utility.trace('Out count : ' || fmla_info.output_count);
427:
428: -- Output information about the fdiu rows.
421: hr_utility.trace('Package : ' || fmla_info.package_name);
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
425: hr_utility.trace('In count : ' || fmla_info.input_count);
426: hr_utility.trace('Out count : ' || fmla_info.output_count);
427:
428: -- Output information about the fdiu rows.
429: first := fmla_info.first_fdiu;
422: hr_utility.trace('First FDIU : ' || fmla_info.first_fdiu);
423: hr_utility.trace('FDIU Count : ' || fmla_info.fdiu_count);
424: hr_utility.trace('Ctx count : ' || fmla_info.context_count);
425: hr_utility.trace('In count : ' || fmla_info.input_count);
426: hr_utility.trace('Out count : ' || fmla_info.output_count);
427:
428: -- Output information about the fdiu rows.
429: first := fmla_info.first_fdiu;
430: last := first + fmla_info.fdiu_count - 1;
428: -- Output information about the fdiu rows.
429: first := fmla_info.first_fdiu;
430: last := first + fmla_info.fdiu_count - 1;
431:
432: hr_utility.trace('');
433: hr_utility.trace('FDIU ROWS');
434: hr_utility.trace('[FDIU]Item Name V[POS] I[POS] ' ||
435: 'Dtype U CSum1 CSum2 ContextId');
436: hr_utility.trace('------------------------- ---------- ---------- ' ||
429: first := fmla_info.first_fdiu;
430: last := first + fmla_info.fdiu_count - 1;
431:
432: hr_utility.trace('');
433: hr_utility.trace('FDIU ROWS');
434: hr_utility.trace('[FDIU]Item Name V[POS] I[POS] ' ||
435: 'Dtype U CSum1 CSum2 ContextId');
436: hr_utility.trace('------------------------- ---------- ---------- ' ||
437: '------ - --------- --------- ----------');
430: last := first + fmla_info.fdiu_count - 1;
431:
432: hr_utility.trace('');
433: hr_utility.trace('FDIU ROWS');
434: hr_utility.trace('[FDIU]Item Name V[POS] I[POS] ' ||
435: 'Dtype U CSum1 CSum2 ContextId');
436: hr_utility.trace('------------------------- ---------- ---------- ' ||
437: '------ - --------- --------- ----------');
438:
432: hr_utility.trace('');
433: hr_utility.trace('FDIU ROWS');
434: hr_utility.trace('[FDIU]Item Name V[POS] I[POS] ' ||
435: 'Dtype U CSum1 CSum2 ContextId');
436: hr_utility.trace('------------------------- ---------- ---------- ' ||
437: '------ - --------- --------- ----------');
438:
439: for i in first..last loop
440: fdiu_info := p_fdiu_info(i);
448: context_sum1 := lpad(fdiu_info.context_sum1, 9 ) || ' ';
449: context_sum2 := lpad(fdiu_info.context_sum2, 9 ) || ' ';
450: context_id := lpad(fdiu_info.context_id, 10);
451:
452: hr_utility.trace(name || varpos || indpos || data_type || usage ||
453: class || context_sum1 || context_sum2 ||
454: context_id);
455:
456: end loop;
485:
486: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then
487: -- Debug level set correctly, output debug information for
488: -- database item cache.
489: hr_utility.trace('');
490: hr_utility.trace('[DBI]Indx DbItem/Context Name Ctx Level1 Ctx Level2' ||
491: ' Value');
492: hr_utility.trace('--------- ------------------- ----------- ----------- ' ||
493: '-----------------------------');
486: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then
487: -- Debug level set correctly, output debug information for
488: -- database item cache.
489: hr_utility.trace('');
490: hr_utility.trace('[DBI]Indx DbItem/Context Name Ctx Level1 Ctx Level2' ||
491: ' Value');
492: hr_utility.trace('--------- ------------------- ----------- ----------- ' ||
493: '-----------------------------');
494:
488: -- database item cache.
489: hr_utility.trace('');
490: hr_utility.trace('[DBI]Indx DbItem/Context Name Ctx Level1 Ctx Level2' ||
491: ' Value');
492: hr_utility.trace('--------- ------------------- ----------- ----------- ' ||
493: '-----------------------------');
494:
495: /*
496: * Information about the contexts.
520: context_level1 := lpad(p_ctx_info(i).context_level1, 11) || ' ';
521: context_level2 := lpad(p_ctx_info(i).context_level2, 11) || ' ';
522:
523: -- Now output the string.
524: hr_utility.trace(l_index || item_name || context_level1 || context_level2 ||
525: value);
526:
527: i := p_ctx_info.next(i);
528:
555: context_level2 := lpad(p_dbi_info(i).context_level2, 11) || ' ';
556: indicator := p_dbi_info(i).indicator;
557:
558: -- Now output the string.
559: hr_utility.trace(l_index || item_name || context_level1 || context_level2 ||
560: value || indicator);
561:
562: i := p_dbi_info.next(i);
563:
566: /*
567: * Information about db item hash table.
568: */
569:
570: hr_utility.trace('[HSH]Indx First Count');
571: hr_utility.trace('--------- --------- ---------');
572:
573: i := p_hash_info.first;
574:
567: * Information about db item hash table.
568: */
569:
570: hr_utility.trace('[HSH]Indx First Count');
571: hr_utility.trace('--------- --------- ---------');
572:
573: i := p_hash_info.first;
574:
575: while(i is not null) loop
579: first_entry := lpad(p_hash_info(i).first_entry, 9) || ' ';
580: chain_count := lpad(p_hash_info(i).chain_count, 9);
581:
582: -- Now output the string.
583: hr_utility.trace(l_index || first_entry || chain_count);
584:
585: i := p_hash_info.next(i);
586:
587: end loop;
632: end if;
633: end if;
634: value := nvl(value, '
635:
636: hr_utility.trace('INVAL: ' || item_name || context_level1 ||
637: context_level2 || context_sum1 || context_sum2 ||
638: value);
639:
640: end if;
670: context_level2 := lpad(p_context_level2, 10) || ' ';
671: old_value := nvl(p_old_value, '
672: new_value := nvl(p_new_value, '
673:
674: hr_utility.trace('CTXCH: ' || item_name || context_level1 ||
675: context_level2 || old_value || new_value);
676: end if;
677:
678: end ctx_change_debug;
708: /*
709: * Inputs table information.
710: */
711:
712: hr_utility.trace('');
713: hr_utility.trace('[IT]Index Input/Context Name ' ||
714: 'Dtype Class Value');
715: hr_utility.trace('--------- ------------------------------ ' ||
716: '------- ------- -----------------------');
709: * Inputs table information.
710: */
711:
712: hr_utility.trace('');
713: hr_utility.trace('[IT]Index Input/Context Name ' ||
714: 'Dtype Class Value');
715: hr_utility.trace('--------- ------------------------------ ' ||
716: '------- ------- -----------------------');
717:
711:
712: hr_utility.trace('');
713: hr_utility.trace('[IT]Index Input/Context Name ' ||
714: 'Dtype Class Value');
715: hr_utility.trace('--------- ------------------------------ ' ||
716: '------- ------- -----------------------');
717:
718: i := p_inputs.first;
719:
726: class := rpad(p_inputs(i).class, 7) || ' ';
727: value := nvl(p_inputs(i).value, '
728:
729: -- Now output the string.
730: hr_utility.trace(l_index || name || data_type || class || value);
731:
732: i := p_inputs.next(i);
733:
734: end loop;
738: /*
739: * Outputs table information.
740: */
741:
742: hr_utility.trace('');
743: hr_utility.trace('[OT]Index Input/Context Name ' ||
744: 'Dtype Value');
745: hr_utility.trace('--------- ------------------------------ ' ||
746: '------- -------------------------------');
739: * Outputs table information.
740: */
741:
742: hr_utility.trace('');
743: hr_utility.trace('[OT]Index Input/Context Name ' ||
744: 'Dtype Value');
745: hr_utility.trace('--------- ------------------------------ ' ||
746: '------- -------------------------------');
747:
741:
742: hr_utility.trace('');
743: hr_utility.trace('[OT]Index Input/Context Name ' ||
744: 'Dtype Value');
745: hr_utility.trace('--------- ------------------------------ ' ||
746: '------- -------------------------------');
747:
748: i := p_outputs.first;
749:
755: data_type := rpad(p_outputs(i).datatype, 7) || ' ';
756: value := nvl(p_outputs(i).value, '
757:
758: -- Now output the string.
759: hr_utility.trace(l_index || name || data_type || value);
760:
761: i := p_outputs.next(i);
762:
763: end loop;
789: --
790: -- Dump out the free chunk list.
791: --
792: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
793: hr_utility.trace('<- Free Chunk List ->');
794: i := p_free_chunks.first;
795: loop
796: exit when not p_free_chunks.exists(i);
797:
794: i := p_free_chunks.first;
795: loop
796: exit when not p_free_chunks.exists(i);
797:
798: hr_utility.trace('(' || i || ',' || p_free_chunks(i) || ')');
799:
800: i := p_free_chunks.next(i);
801: end loop;
802: end if;
848: p_free_chunks.delete(l_candidate);
849: end if;
850:
851: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
852: hr_utility.trace('Reuse chunk:'||l_candidate||','||p_chunk_size);
853: end if;
854:
855: end if;
856: end find_free_chunk;
903: (l_first_chunk + p_free_chunks(l_first_chunk) - 1 < p_first_chunk);
904:
905: if not l_assertion then
906: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
907: hr_utility.trace
908: ('AddToFreeList assert failed:'||p_first_chunk||','||
909: to_char(p_chunk_count-1)|| ' overlaps :'||l_first_chunk||','||
910: to_char(p_free_chunks(l_first_chunk)-1));
911: end if;
1235: p_context_level2 := 2 ** g_ctx_levels2;
1236: p_context_level1 := 0;
1237: g_ctx_levels2 := g_ctx_levels2 + 1;
1238: else
1239: hr_utility.set_message(801, 'FF_33289_CONTEXT_CACHE_FULL');
1240: hr_utility.set_message_token('1', C_MAX_CONTEXTS);
1241: hr_utility.raise_error;
1242: end if;
1243: end get_next_context_level;
1236: p_context_level1 := 0;
1237: g_ctx_levels2 := g_ctx_levels2 + 1;
1238: else
1239: hr_utility.set_message(801, 'FF_33289_CONTEXT_CACHE_FULL');
1240: hr_utility.set_message_token('1', C_MAX_CONTEXTS);
1241: hr_utility.raise_error;
1242: end if;
1243: end get_next_context_level;
1244:
1237: g_ctx_levels2 := g_ctx_levels2 + 1;
1238: else
1239: hr_utility.set_message(801, 'FF_33289_CONTEXT_CACHE_FULL');
1240: hr_utility.set_message_token('1', C_MAX_CONTEXTS);
1241: hr_utility.raise_error;
1242: end if;
1243: end get_next_context_level;
1244:
1245: ----------------------------- dbi2route_id ------------------------------------
1296: --
1297: -- Ask user to recompile because of potential data dictionary
1298: -- problem.
1299: --
1300: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1301: hr_utility.set_message_token('1', p_formula_name);
1302: hr_utility.raise_error;
1303: end if;
1304: close csr_route_id;
1297: -- Ask user to recompile because of potential data dictionary
1298: -- problem.
1299: --
1300: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1301: hr_utility.set_message_token('1', p_formula_name);
1302: hr_utility.raise_error;
1303: end if;
1304: close csr_route_id;
1305:
1298: -- problem.
1299: --
1300: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1301: hr_utility.set_message_token('1', p_formula_name);
1302: hr_utility.raise_error;
1303: end if;
1304: close csr_route_id;
1305:
1306: return l_route_id;
1351: --
1352: -- Ask user to recompile because of potential data dictionary
1353: -- problem.
1354: --
1355: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1356: hr_utility.set_message_token('1', p_formula_name);
1357: hr_utility.raise_error;
1358: end if;
1359: close csr_route_exists;
1352: -- Ask user to recompile because of potential data dictionary
1353: -- problem.
1354: --
1355: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1356: hr_utility.set_message_token('1', p_formula_name);
1357: hr_utility.raise_error;
1358: end if;
1359: close csr_route_exists;
1360:
1353: -- problem.
1354: --
1355: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1356: hr_utility.set_message_token('1', p_formula_name);
1357: hr_utility.raise_error;
1358: end if;
1359: close csr_route_exists;
1360:
1361: open csr_route_contexts(p_route_id => p_route_id);
1367: --
1368: -- Ask user to recompile because of potential data dictionary
1369: -- problem.
1370: --
1371: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1372: hr_utility.set_message_token('1', p_formula_name);
1373: hr_utility.raise_error;
1374: end if;
1375:
1368: -- Ask user to recompile because of potential data dictionary
1369: -- problem.
1370: --
1371: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1372: hr_utility.set_message_token('1', p_formula_name);
1373: hr_utility.raise_error;
1374: end if;
1375:
1376: l_sum1 := l_sum1 + g_ctx_info(l_context_ids(i)).context_level1;
1369: -- problem.
1370: --
1371: hr_utility.set_message(801, 'FFXBIF71_NEED_TO_REVERIFY');
1372: hr_utility.set_message_token('1', p_formula_name);
1373: hr_utility.raise_error;
1374: end if;
1375:
1376: l_sum1 := l_sum1 + g_ctx_info(l_context_ids(i)).context_level1;
1377: l_sum2 := l_sum2 + g_ctx_info(l_context_ids(i)).context_level2;
1512: --
1513: -- Handle the case where there is no compiled formula.
1514: --
1515: when no_data_found then
1516: hr_utility.set_message(801, 'FFX22J_FORMULA_NOT_FOUND');
1517: hr_utility.set_message_token('1', p_formula_id);
1518: hr_utility.raise_error;
1519: when others then
1520: raise;
1513: -- Handle the case where there is no compiled formula.
1514: --
1515: when no_data_found then
1516: hr_utility.set_message(801, 'FFX22J_FORMULA_NOT_FOUND');
1517: hr_utility.set_message_token('1', p_formula_id);
1518: hr_utility.raise_error;
1519: when others then
1520: raise;
1521: end;
1514: --
1515: when no_data_found then
1516: hr_utility.set_message(801, 'FFX22J_FORMULA_NOT_FOUND');
1517: hr_utility.set_message_token('1', p_formula_id);
1518: hr_utility.raise_error;
1519: when others then
1520: raise;
1521: end;
1522:
1560: if l_first_fdiu is null then
1561: l_first_fdiu := nvl(p_fdiu_info.last, 0) + 1;
1562:
1563: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
1564: hr_utility.trace
1565: ('ff_fetch add to FDIU from end of list:' || l_first_fdiu || ',' ||
1566: l_fdiu_entry_count
1567: );
1568: end if;
1575: l_first_fdiu > g_free_fdiu.last + g_free_fdiu(g_free_fdiu.last) - 1;
1576:
1577: if not l_assertion and
1578: (bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
1579: hr_utility.trace
1580: ('ff_fetch assertion 2 failed:'||l_first_fdiu||','||
1581: to_char(g_free_fdiu.last + g_free_fdiu(g_free_fdiu.last) - 1)
1582: );
1583: end if;
1600: if(l_fdiu_usage(i) = 'U' or l_fdiu_usage(i) = 'D')
1601: then
1602: -- There MUST be a context_id for 'U' or 'D'.
1603: if(l_fdiu_context_id(i) is null) then
1604: hr_utility.set_message(801, 'FFPLX01_CONTEXT_ID_NULL');
1605: hr_utility.set_message_token('FMLA_NAME', l_formula_name);
1606: hr_utility.set_message_token('ITEM_NAME', l_fdiu_name(i));
1607: hr_utility.raise_error;
1608: end if;
1601: then
1602: -- There MUST be a context_id for 'U' or 'D'.
1603: if(l_fdiu_context_id(i) is null) then
1604: hr_utility.set_message(801, 'FFPLX01_CONTEXT_ID_NULL');
1605: hr_utility.set_message_token('FMLA_NAME', l_formula_name);
1606: hr_utility.set_message_token('ITEM_NAME', l_fdiu_name(i));
1607: hr_utility.raise_error;
1608: end if;
1609:
1602: -- There MUST be a context_id for 'U' or 'D'.
1603: if(l_fdiu_context_id(i) is null) then
1604: hr_utility.set_message(801, 'FFPLX01_CONTEXT_ID_NULL');
1605: hr_utility.set_message_token('FMLA_NAME', l_formula_name);
1606: hr_utility.set_message_token('ITEM_NAME', l_fdiu_name(i));
1607: hr_utility.raise_error;
1608: end if;
1609:
1610: if(l_fdiu_usage(i) = 'U') then
1603: if(l_fdiu_context_id(i) is null) then
1604: hr_utility.set_message(801, 'FFPLX01_CONTEXT_ID_NULL');
1605: hr_utility.set_message_token('FMLA_NAME', l_formula_name);
1606: hr_utility.set_message_token('ITEM_NAME', l_fdiu_name(i));
1607: hr_utility.raise_error;
1608: end if;
1609:
1610: if(l_fdiu_usage(i) = 'U') then
1611: l_context_count := l_context_count + 1; -- count contexts.
1733: -- If chunks were reused then return them to the free list.
1734: --
1735: if l_reused then
1736: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
1737: hr_utility.trace('ff_fetch return reused rows to free list.');
1738: end if;
1739:
1740: add_to_free_list
1741: (p_first_chunk => l_fmla_info.first_fdiu
1747: -- the end of the fdiu list.
1748: --
1749: elsif l_got_fdiu_chunks then
1750: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then
1751: hr_utility.trace('ff_fetch add new rows to free list.');
1752: end if;
1753:
1754: add_to_free_list
1755: (p_first_chunk => l_fmla_info.first_fdiu
1789:
1790: -- Handle getting to the end of the buffer.
1791: if p_lru_slot = p_exec_info.fmla_cache_size then
1792: if(bitand(ff_utils.g_debug_level, ff_exec.MRU_DBG) <> 0) then
1793: hr_utility.trace('LRU = 1');
1794: end if;
1795:
1796: p_lru_slot := 1;
1797: else
1795:
1796: p_lru_slot := 1;
1797: else
1798: if(bitand(ff_utils.g_debug_level, ff_exec.MRU_DBG) <> 0) then
1799: hr_utility.trace('LRU := LRU + 1:' || to_char(p_lru_slot + 1));
1800: end if;
1801:
1802: p_lru_slot := p_lru_slot + 1;
1803: end if;
2168: l_in_index := l_in_index + 1; -- Count index of inputs table.
2169:
2170: /* user not allowed to supply NULL value for context */
2171: if(p_inputs(l_in_index).value is null) then
2172: hr_utility.set_message(801, 'FFX02_UIDCOL_MISSING');
2173: hr_utility.set_message_token('1',
2174: p_fmla_info(p_cache_slot).formula_name);
2175: hr_utility.set_message_token('2', l_item_name);
2176: hr_utility.raise_error;
2169:
2170: /* user not allowed to supply NULL value for context */
2171: if(p_inputs(l_in_index).value is null) then
2172: hr_utility.set_message(801, 'FFX02_UIDCOL_MISSING');
2173: hr_utility.set_message_token('1',
2174: p_fmla_info(p_cache_slot).formula_name);
2175: hr_utility.set_message_token('2', l_item_name);
2176: hr_utility.raise_error;
2177: end if;
2171: if(p_inputs(l_in_index).value is null) then
2172: hr_utility.set_message(801, 'FFX02_UIDCOL_MISSING');
2173: hr_utility.set_message_token('1',
2174: p_fmla_info(p_cache_slot).formula_name);
2175: hr_utility.set_message_token('2', l_item_name);
2176: hr_utility.raise_error;
2177: end if;
2178:
2179: -- read context value from cache.
2172: hr_utility.set_message(801, 'FFX02_UIDCOL_MISSING');
2173: hr_utility.set_message_token('1',
2174: p_fmla_info(p_cache_slot).formula_name);
2175: hr_utility.set_message_token('2', l_item_name);
2176: hr_utility.raise_error;
2177: end if;
2178:
2179: -- read context value from cache.
2180: l_tvalue := p_ctx_info(l_context_id).tvalue;
2296: p_n(l_varpos) := l_nvalue;
2297: elsif(l_data_type = C_TEXT) then
2298: p_t(l_varpos) := l_tvalue;
2299: else
2300: hr_utility.set_message(801, 'FFIC874_UNKNOWN_DATATYPE');
2301: hr_utility.set_message_token('1', l_item_name);
2302: hr_utility.set_message_token('2', l_data_type);
2303: hr_utility.raise_error;
2304: end if;
2297: elsif(l_data_type = C_TEXT) then
2298: p_t(l_varpos) := l_tvalue;
2299: else
2300: hr_utility.set_message(801, 'FFIC874_UNKNOWN_DATATYPE');
2301: hr_utility.set_message_token('1', l_item_name);
2302: hr_utility.set_message_token('2', l_data_type);
2303: hr_utility.raise_error;
2304: end if;
2305:
2298: p_t(l_varpos) := l_tvalue;
2299: else
2300: hr_utility.set_message(801, 'FFIC874_UNKNOWN_DATATYPE');
2301: hr_utility.set_message_token('1', l_item_name);
2302: hr_utility.set_message_token('2', l_data_type);
2303: hr_utility.raise_error;
2304: end if;
2305:
2306: /*
2299: else
2300: hr_utility.set_message(801, 'FFIC874_UNKNOWN_DATATYPE');
2301: hr_utility.set_message_token('1', l_item_name);
2302: hr_utility.set_message_token('2', l_data_type);
2303: hr_utility.raise_error;
2304: end if;
2305:
2306: /*
2307: * Bind the indicator (if appropriate).
2567: begin
2568: /* Set decimal point character. */
2569: g_decpoint := substr(to_char(1.1),2,1);
2570:
2571: g_debug := hr_utility.debug_enabled;
2572: if g_debug then
2573: ff_utils.entry('init_formula');
2574: end if;
2575:
2573: ff_utils.entry('init_formula');
2574: end if;
2575:
2576: if g_debug then
2577: hr_utility.trace('fmla cache size: ' || g_exec_info.fmla_cache_size);
2578: end if;
2579:
2580: -- Load formula information into cache if necessary.
2581: -- Global variables are passed to aid modularity.
2664: l_n ff_wrapper_pkg.t_number;
2665: l_t ff_wrapper_pkg.t_text;
2666: l_i ff_wrapper_pkg.t_number;
2667: begin
2668: g_debug := hr_utility.debug_enabled;
2669: if g_debug then
2670: ff_utils.entry('run_formula');
2671: end if;
2672:
2671: end if;
2672:
2673: -- Check that the execution engine is initialised.
2674: if(g_exec_info.formula_id is null) then
2675: hr_utility.set_message(801, 'FFPLX03_NO_INIT');
2676: hr_utility.raise_error;
2677: end if;
2678:
2679: -- Sanity checks on the number of rows in the
2672:
2673: -- Check that the execution engine is initialised.
2674: if(g_exec_info.formula_id is null) then
2675: hr_utility.set_message(801, 'FFPLX03_NO_INIT');
2676: hr_utility.raise_error;
2677: end if;
2678:
2679: -- Sanity checks on the number of rows in the
2680: -- inputs and outputs tables. This helps to
2726: );
2727: exception
2728: when CANNOT_FIND_PROG_UNIT then
2729: -- Wrapper package body needs to be regenerated.
2730: hr_utility.set_message(802, 'FF_33186_GENERATE_WRAPPER');
2731: hr_utility.set_message_token('1', l_fmla_name);
2732: hr_utility.raise_error;
2733:
2734: when others then
2727: exception
2728: when CANNOT_FIND_PROG_UNIT then
2729: -- Wrapper package body needs to be regenerated.
2730: hr_utility.set_message(802, 'FF_33186_GENERATE_WRAPPER');
2731: hr_utility.set_message_token('1', l_fmla_name);
2732: hr_utility.raise_error;
2733:
2734: when others then
2735: -- Getting an unhandled exception from PLSQL.
2728: when CANNOT_FIND_PROG_UNIT then
2729: -- Wrapper package body needs to be regenerated.
2730: hr_utility.set_message(802, 'FF_33186_GENERATE_WRAPPER');
2731: hr_utility.set_message_token('1', l_fmla_name);
2732: hr_utility.raise_error;
2733:
2734: when others then
2735: -- Getting an unhandled exception from PLSQL.
2736: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2732: hr_utility.raise_error;
2733:
2734: when others then
2735: -- Getting an unhandled exception from PLSQL.
2736: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2737: hr_utility.set_message_token('1', l_fmla_name);
2738: hr_utility.set_message_token('2', sqlerrm);
2739: hr_utility.raise_error;
2740:
2733:
2734: when others then
2735: -- Getting an unhandled exception from PLSQL.
2736: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2737: hr_utility.set_message_token('1', l_fmla_name);
2738: hr_utility.set_message_token('2', sqlerrm);
2739: hr_utility.raise_error;
2740:
2741: end;
2734: when others then
2735: -- Getting an unhandled exception from PLSQL.
2736: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2737: hr_utility.set_message_token('1', l_fmla_name);
2738: hr_utility.set_message_token('2', sqlerrm);
2739: hr_utility.raise_error;
2740:
2741: end;
2742: else
2735: -- Getting an unhandled exception from PLSQL.
2736: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2737: hr_utility.set_message_token('1', l_fmla_name);
2738: hr_utility.set_message_token('2', sqlerrm);
2739: hr_utility.raise_error;
2740:
2741: end;
2742: else
2743: begin
2751: execute immediate
2752: 'begin ' || g_fmla_info(l_cache_slot).package_name || '.formula; end;';
2753: exception
2754: when bad_plsql then
2755: hr_utility.set_message(801,'FFX22J_FORMULA_NOT_FOUND');
2756: hr_utility.set_message_token('1',l_fmla_name);
2757: hr_utility.raise_error;
2758:
2759: when others then
2752: 'begin ' || g_fmla_info(l_cache_slot).package_name || '.formula; end;';
2753: exception
2754: when bad_plsql then
2755: hr_utility.set_message(801,'FFX22J_FORMULA_NOT_FOUND');
2756: hr_utility.set_message_token('1',l_fmla_name);
2757: hr_utility.raise_error;
2758:
2759: when others then
2760: -- Getting an unhandled exception from PLSQL.
2753: exception
2754: when bad_plsql then
2755: hr_utility.set_message(801,'FFX22J_FORMULA_NOT_FOUND');
2756: hr_utility.set_message_token('1',l_fmla_name);
2757: hr_utility.raise_error;
2758:
2759: when others then
2760: -- Getting an unhandled exception from PLSQL.
2761: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2757: hr_utility.raise_error;
2758:
2759: when others then
2760: -- Getting an unhandled exception from PLSQL.
2761: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2762: hr_utility.set_message_token('1', l_fmla_name);
2763: hr_utility.set_message_token('2', sqlerrm);
2764: hr_utility.raise_error;
2765: end;
2758:
2759: when others then
2760: -- Getting an unhandled exception from PLSQL.
2761: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2762: hr_utility.set_message_token('1', l_fmla_name);
2763: hr_utility.set_message_token('2', sqlerrm);
2764: hr_utility.raise_error;
2765: end;
2766: --
2759: when others then
2760: -- Getting an unhandled exception from PLSQL.
2761: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2762: hr_utility.set_message_token('1', l_fmla_name);
2763: hr_utility.set_message_token('2', sqlerrm);
2764: hr_utility.raise_error;
2765: end;
2766: --
2767: l_d := ff_wrapper_pkg.g_d;
2760: -- Getting an unhandled exception from PLSQL.
2761: hr_utility.set_message(801, 'FFX18_PLSQL_ERROR');
2762: hr_utility.set_message_token('1', l_fmla_name);
2763: hr_utility.set_message_token('2', sqlerrm);
2764: hr_utility.raise_error;
2765: end;
2766: --
2767: l_d := ff_wrapper_pkg.g_d;
2768: l_i := ff_wrapper_pkg.g_i;
2779: if(l_err_number > 0) then
2780:
2781: -- Precise error detected in plsql, set up tokens.
2782: if(l_err_number = 1) then
2783: hr_utility.set_message(801, 'FFX00_LOCAL_NOT_INITIALIZED');
2784: elsif(l_err_number = 2) then
2785: hr_utility.set_message(801, 'FFX00_ZERO_DIVISION');
2786: elsif(l_err_number = 3) then
2787: hr_utility.set_message(801, 'FFX00_DATA_NOT_FOUND');
2781: -- Precise error detected in plsql, set up tokens.
2782: if(l_err_number = 1) then
2783: hr_utility.set_message(801, 'FFX00_LOCAL_NOT_INITIALIZED');
2784: elsif(l_err_number = 2) then
2785: hr_utility.set_message(801, 'FFX00_ZERO_DIVISION');
2786: elsif(l_err_number = 3) then
2787: hr_utility.set_message(801, 'FFX00_DATA_NOT_FOUND');
2788: elsif(l_err_number = 4) then
2789: hr_utility.set_message(801, 'FFX00_TOO_MANY_ROWS');
2783: hr_utility.set_message(801, 'FFX00_LOCAL_NOT_INITIALIZED');
2784: elsif(l_err_number = 2) then
2785: hr_utility.set_message(801, 'FFX00_ZERO_DIVISION');
2786: elsif(l_err_number = 3) then
2787: hr_utility.set_message(801, 'FFX00_DATA_NOT_FOUND');
2788: elsif(l_err_number = 4) then
2789: hr_utility.set_message(801, 'FFX00_TOO_MANY_ROWS');
2790: elsif(l_err_number = 5) then
2791: hr_utility.set_message(801, 'FFX00_VALUE_RANGE_ERROR');
2785: hr_utility.set_message(801, 'FFX00_ZERO_DIVISION');
2786: elsif(l_err_number = 3) then
2787: hr_utility.set_message(801, 'FFX00_DATA_NOT_FOUND');
2788: elsif(l_err_number = 4) then
2789: hr_utility.set_message(801, 'FFX00_TOO_MANY_ROWS');
2790: elsif(l_err_number = 5) then
2791: hr_utility.set_message(801, 'FFX00_VALUE_RANGE_ERROR');
2792: elsif(l_err_number = 6) then
2793: hr_utility.set_message(801, 'FFX00_INVALID_NUMBER');
2787: hr_utility.set_message(801, 'FFX00_DATA_NOT_FOUND');
2788: elsif(l_err_number = 4) then
2789: hr_utility.set_message(801, 'FFX00_TOO_MANY_ROWS');
2790: elsif(l_err_number = 5) then
2791: hr_utility.set_message(801, 'FFX00_VALUE_RANGE_ERROR');
2792: elsif(l_err_number = 6) then
2793: hr_utility.set_message(801, 'FFX00_INVALID_NUMBER');
2794: elsif(l_err_number = 7) then
2795: hr_utility.set_message(801, 'FFX00_NULL_VALUE');
2789: hr_utility.set_message(801, 'FFX00_TOO_MANY_ROWS');
2790: elsif(l_err_number = 5) then
2791: hr_utility.set_message(801, 'FFX00_VALUE_RANGE_ERROR');
2792: elsif(l_err_number = 6) then
2793: hr_utility.set_message(801, 'FFX00_INVALID_NUMBER');
2794: elsif(l_err_number = 7) then
2795: hr_utility.set_message(801, 'FFX00_NULL_VALUE');
2796: elsif(l_err_number = 8) then
2797: hr_utility.set_message(801, 'FFX00_UDF_ERROR');
2791: hr_utility.set_message(801, 'FFX00_VALUE_RANGE_ERROR');
2792: elsif(l_err_number = 6) then
2793: hr_utility.set_message(801, 'FFX00_INVALID_NUMBER');
2794: elsif(l_err_number = 7) then
2795: hr_utility.set_message(801, 'FFX00_NULL_VALUE');
2796: elsif(l_err_number = 8) then
2797: hr_utility.set_message(801, 'FFX00_UDF_ERROR');
2798: else
2799: hr_utility.set_message(801, 'FFPLX02_UNKNOWN_PLSQL_ERR');
2793: hr_utility.set_message(801, 'FFX00_INVALID_NUMBER');
2794: elsif(l_err_number = 7) then
2795: hr_utility.set_message(801, 'FFX00_NULL_VALUE');
2796: elsif(l_err_number = 8) then
2797: hr_utility.set_message(801, 'FFX00_UDF_ERROR');
2798: else
2799: hr_utility.set_message(801, 'FFPLX02_UNKNOWN_PLSQL_ERR');
2800: hr_utility.set_message_token('ERROR', l_err_number);
2801: hr_utility.raise_error;
2795: hr_utility.set_message(801, 'FFX00_NULL_VALUE');
2796: elsif(l_err_number = 8) then
2797: hr_utility.set_message(801, 'FFX00_UDF_ERROR');
2798: else
2799: hr_utility.set_message(801, 'FFPLX02_UNKNOWN_PLSQL_ERR');
2800: hr_utility.set_message_token('ERROR', l_err_number);
2801: hr_utility.raise_error;
2802: end if;
2803:
2796: elsif(l_err_number = 8) then
2797: hr_utility.set_message(801, 'FFX00_UDF_ERROR');
2798: else
2799: hr_utility.set_message(801, 'FFPLX02_UNKNOWN_PLSQL_ERR');
2800: hr_utility.set_message_token('ERROR', l_err_number);
2801: hr_utility.raise_error;
2802: end if;
2803:
2804: hr_utility.set_message_token('1', l_fmla_name);
2797: hr_utility.set_message(801, 'FFX00_UDF_ERROR');
2798: else
2799: hr_utility.set_message(801, 'FFPLX02_UNKNOWN_PLSQL_ERR');
2800: hr_utility.set_message_token('ERROR', l_err_number);
2801: hr_utility.raise_error;
2802: end if;
2803:
2804: hr_utility.set_message_token('1', l_fmla_name);
2805: hr_utility.set_message_token('2', l_line_number);
2800: hr_utility.set_message_token('ERROR', l_err_number);
2801: hr_utility.raise_error;
2802: end if;
2803:
2804: hr_utility.set_message_token('1', l_fmla_name);
2805: hr_utility.set_message_token('2', l_line_number);
2806: hr_utility.set_message_token('3', l_error_message);
2807: hr_utility.raise_error;
2808:
2801: hr_utility.raise_error;
2802: end if;
2803:
2804: hr_utility.set_message_token('1', l_fmla_name);
2805: hr_utility.set_message_token('2', l_line_number);
2806: hr_utility.set_message_token('3', l_error_message);
2807: hr_utility.raise_error;
2808:
2809: elsif(l_err_number < 0) then
2802: end if;
2803:
2804: hr_utility.set_message_token('1', l_fmla_name);
2805: hr_utility.set_message_token('2', l_line_number);
2806: hr_utility.set_message_token('3', l_error_message);
2807: hr_utility.raise_error;
2808:
2809: elsif(l_err_number < 0) then
2810:
2803:
2804: hr_utility.set_message_token('1', l_fmla_name);
2805: hr_utility.set_message_token('2', l_line_number);
2806: hr_utility.set_message_token('3', l_error_message);
2807: hr_utility.raise_error;
2808:
2809: elsif(l_err_number < 0) then
2810:
2811: -- Oracle error has been trapped by Formula.
2808:
2809: elsif(l_err_number < 0) then
2810:
2811: -- Oracle error has been trapped by Formula.
2812: hr_utility.set_message(801, 'FFX18_ORA_PLSQL');
2813: hr_utility.set_message_token('1', l_fmla_name);
2814: hr_utility.set_message_token('2', l_err_number);
2815: hr_utility.set_message_token('3', l_line_number);
2816: hr_utility.raise_error;
2809: elsif(l_err_number < 0) then
2810:
2811: -- Oracle error has been trapped by Formula.
2812: hr_utility.set_message(801, 'FFX18_ORA_PLSQL');
2813: hr_utility.set_message_token('1', l_fmla_name);
2814: hr_utility.set_message_token('2', l_err_number);
2815: hr_utility.set_message_token('3', l_line_number);
2816: hr_utility.raise_error;
2817:
2810:
2811: -- Oracle error has been trapped by Formula.
2812: hr_utility.set_message(801, 'FFX18_ORA_PLSQL');
2813: hr_utility.set_message_token('1', l_fmla_name);
2814: hr_utility.set_message_token('2', l_err_number);
2815: hr_utility.set_message_token('3', l_line_number);
2816: hr_utility.raise_error;
2817:
2818: end if;
2811: -- Oracle error has been trapped by Formula.
2812: hr_utility.set_message(801, 'FFX18_ORA_PLSQL');
2813: hr_utility.set_message_token('1', l_fmla_name);
2814: hr_utility.set_message_token('2', l_err_number);
2815: hr_utility.set_message_token('3', l_line_number);
2816: hr_utility.raise_error;
2817:
2818: end if;
2819:
2812: hr_utility.set_message(801, 'FFX18_ORA_PLSQL');
2813: hr_utility.set_message_token('1', l_fmla_name);
2814: hr_utility.set_message_token('2', l_err_number);
2815: hr_utility.set_message_token('3', l_line_number);
2816: hr_utility.raise_error;
2817:
2818: end if;
2819:
2820: /*