DBA Data[Home] [Help]

APPS.FF_EXEC dependencies on FF_UTILS

Line 344: l_debug_level := l_debug_level + ff_utils.ROUTING;

340: -- before we can use the other options.
341: if(l_exec_debug) then
342: -- Set the appropriate flags.
343: if(l_routing) then
344: l_debug_level := l_debug_level + ff_utils.ROUTING;
345: end if;
346:
347: if(l_ff_debug) then
348: l_debug_level := l_debug_level + ff_exec.FF_DBG;

Line 368: ff_utils.g_debug_level := l_debug_level;

364: l_debug_level := l_debug_level + ff_exec.IO_TABLE_DBG;
365: end if;
366:
367: -- Set the global flag.
368: ff_utils.g_debug_level := l_debug_level;
369:
370: end if;
371:
372: end check_profile_debug;

Line 404: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then

400: fdiu_info fdiu_info_r;
401:
402: begin
403: -- Check the debug flag settting.
404: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
405: return;
406: end if;
407:
408: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

Line 408: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

404: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
405: return;
406: end if;
407:
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('');

Line 482: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then

478: i binary_integer;
479:
480: begin
481: -- Check the debug flag settting.
482: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
483: return;
484: end if;
485:
486: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then

Line 486: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then

482: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
483: return;
484: end if;
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' ||

Line 611: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then

607: context_sum2 varchar2(30);
608: value varchar2(255);
609: begin
610: -- Check the debug flag settting.
611: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
612: return;
613: end if;
614:
615: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then

Line 615: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then

611: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
612: return;
613: end if;
614:
615: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then
616:
617: item_name := rpad(p_dbi_info.item_name, 20) || ' ';
618: context_level1 := lpad(p_dbi_info.context_level1,10) || ' ';
619: context_sum1 := lpad(p_context_sum1, 10) || ' ';

Line 662: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then

658: old_value varchar2(255);
659: new_value varchar2(255);
660: begin
661: -- Check the debug flag settting.
662: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
663: return;
664: end if;
665:
666: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then

Line 666: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then

662: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
663: return;
664: end if;
665:
666: if(bitand(ff_utils.g_debug_level, ff_exec.DBI_CACHE_DBG) <> 0) then
667:
668: item_name := rpad(p_item_name, 20) || ' ';
669: context_level1 := lpad(p_context_level1, 10) || ' ';
670: context_level2 := lpad(p_context_level2, 10) || ' ';

Line 698: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then

694: i binary_integer;
695:
696: begin
697: -- Check the debug flag settting.
698: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
699: return;
700: end if;
701:
702: if(bitand(ff_utils.g_debug_level, ff_exec.IO_TABLE_DBG) <> 0) then

Line 702: if(bitand(ff_utils.g_debug_level, ff_exec.IO_TABLE_DBG) <> 0) then

698: if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
699: return;
700: end if;
701:
702: if(bitand(ff_utils.g_debug_level, ff_exec.IO_TABLE_DBG) <> 0) then
703: -- Debug level set correctly, output debug information for
704: -- input table information.
705:
706: if(p_type = 'INPUT') then

Line 792: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

788:
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);

Line 851: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

847: p_start := l_candidate;
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;

Line 906: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

902: (p_first_chunk + p_chunk_count - 1 < l_first_chunk) or
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));

Line 914: ff_utils.assert

910: to_char(p_free_chunks(l_first_chunk)-1));
911: end if;
912: end if;
913:
914: ff_utils.assert
915: (p_expression => l_assertion
916: ,p_location => 'add_to_free_list:1'
917: );
918:

Line 999: ff_utils.entry('find_dbi_cache_entry');

995: l_end binary_integer;
996: l_index binary_integer;
997: begin
998:
999: ff_utils.entry('find_dbi_cache_entry');
1000:
1001: if(not g_hash_info.exists(p_context_id)) then
1002: -- No entry at all for database item.
1003: ff_utils.exit('find_dbi_cache_entry');

Line 1003: ff_utils.exit('find_dbi_cache_entry');

999: ff_utils.entry('find_dbi_cache_entry');
1000:
1001: if(not g_hash_info.exists(p_context_id)) then
1002: -- No entry at all for database item.
1003: ff_utils.exit('find_dbi_cache_entry');
1004: return(null);
1005: end if;
1006:
1007: -- We know there is an entry, need to find out which one.

Line 1019: ff_utils.exit('find_dbi_cache_entry');

1015: exit;
1016: end if;
1017: end loop;
1018:
1019: ff_utils.exit('find_dbi_cache_entry');
1020:
1021: return(l_index);
1022:
1023: end find_dbi_cache_entry;

Line 1050: ff_utils.entry('read_dbi_cache');

1046: l_index binary_integer;
1047: begin
1048:
1049: if g_debug then
1050: ff_utils.entry('read_dbi_cache');
1051: end if;
1052:
1053: l_index := find_dbi_cache_entry(p_context_id, p_item_name);
1054:

Line 1056: ff_utils.assert((l_index is not null), 'read_dbi_cache:1');

1052:
1053: l_index := find_dbi_cache_entry(p_context_id, p_item_name);
1054:
1055: -- Entry should exist when reading from the cache.
1056: ff_utils.assert((l_index is not null), 'read_dbi_cache:1');
1057:
1058: if g_debug then
1059: ff_utils.exit('read_dbi_cache');
1060: end if;

Line 1059: ff_utils.exit('read_dbi_cache');

1055: -- Entry should exist when reading from the cache.
1056: ff_utils.assert((l_index is not null), 'read_dbi_cache:1');
1057:
1058: if g_debug then
1059: ff_utils.exit('read_dbi_cache');
1060: end if;
1061:
1062: -- Simply return the value from cache.
1063: if g_dbi_info(l_index).indicator = FF_NOT_NULL then

Line 1115: ff_utils.entry('write_dbi_cache');

1111: l_index binary_integer;
1112: begin
1113:
1114: if g_debug then
1115: ff_utils.entry('write_dbi_cache');
1116: end if;
1117:
1118: -- Look for an existing entry in the dbi cache.
1119: l_index := find_dbi_cache_entry(p_context_id, p_item_name);

Line 1123: ff_utils.assert

1119: l_index := find_dbi_cache_entry(p_context_id, p_item_name);
1120:
1121: if(l_index is not null) then
1122:
1123: ff_utils.assert
1124: (p_expression => p_data_type = g_dbi_info(l_index).data_type
1125: ,p_location => 'write_dbi_cache:0'
1126: );
1127:

Line 1182: ff_utils.assert((p_context_level1 is not null), 'write_dbi_cache:1');

1178:
1179: end if;
1180:
1181: -- For new create, the context level should be not null.
1182: ff_utils.assert((p_context_level1 is not null), 'write_dbi_cache:1');
1183: ff_utils.assert((p_context_level2 is not null), 'write_dbi_cache:2');
1184:
1185: -- Now create the first dbi cache entry.
1186: g_dbi_info(l_index).item_name := p_item_name;

Line 1183: ff_utils.assert((p_context_level2 is not null), 'write_dbi_cache:2');

1179: end if;
1180:
1181: -- For new create, the context level should be not null.
1182: ff_utils.assert((p_context_level1 is not null), 'write_dbi_cache:1');
1183: ff_utils.assert((p_context_level2 is not null), 'write_dbi_cache:2');
1184:
1185: -- Now create the first dbi cache entry.
1186: g_dbi_info(l_index).item_name := p_item_name;
1187: g_dbi_info(l_index).context_level1 := p_context_level1;

Line 1213: ff_utils.exit('write_dbi_cache');

1209: g_dbi_info(l_index).indicator := p_indicator;
1210: end if;
1211:
1212: if g_debug then
1213: ff_utils.exit('write_dbi_cache');
1214: end if;
1215:
1216: end write_dbi_cache;
1217:

Line 1481: ff_utils.entry('ff_fetch');

1477:
1478: begin
1479:
1480: if g_debug then
1481: ff_utils.entry('ff_fetch');
1482: end if;
1483:
1484: /*
1485: * Fetch formula information.

Line 1549: ff_utils.assert((l_fdiu_entry_count = l_fdiu_name.count),

1545: l_fdiu_route_id;
1546: close fdiuc1;
1547:
1548: -- Check that number of fdiu entries matches the fdiu count
1549: ff_utils.assert((l_fdiu_entry_count = l_fdiu_name.count),
1550: 'ff_fetch:1');
1551:
1552: --
1553: -- See if it is possible to reuse free fdiu records.

Line 1563: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

1559: );
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: );

Line 1578: (bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

1574: l_assertion :=
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: );

Line 1585: ff_utils.assert(l_assertion, 'ff_fetch:2');

1581: to_char(g_free_fdiu.last + g_free_fdiu(g_free_fdiu.last) - 1)
1582: );
1583: end if;
1584:
1585: ff_utils.assert(l_assertion, 'ff_fetch:2');
1586: end if;
1587: else
1588: l_reused := true;
1589: end if;

Line 1724: ff_utils.exit('ff_fetch');

1720: p_fmla_info(p_free_slot) := l_fmla_info;
1721: p_fmla_lookups(p_formula_id) := p_free_slot;
1722:
1723: if g_debug then
1724: ff_utils.exit('ff_fetch');
1725: end if;
1726:
1727: exception
1728: when others then

Line 1736: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

1732: --
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

Line 1750: if(bitand(ff_utils.g_debug_level, ff_exec.FF_CACHE_DBG) <> 0) then

1746: -- If the chunks weren't reused then they were allocated from
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

Line 1762: ff_utils.exit('ff_fetch:2');

1758: );
1759: end if;
1760: --
1761: if g_debug then
1762: ff_utils.exit('ff_fetch:2');
1763: end if;
1764: --
1765: raise;
1766: end ff_fetch;

Line 1792: if(bitand(ff_utils.g_debug_level, ff_exec.MRU_DBG) <> 0) then

1788: p_lru_slot = p_mru_slot then
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;

Line 1798: if(bitand(ff_utils.g_debug_level, ff_exec.MRU_DBG) <> 0) then

1794: end if;
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;

Line 1843: ff_utils.entry('zap_fcr');

1839: p_fdiu_info in out nocopy fdiu_info_t) is
1840: begin
1841:
1842: if g_debug then
1843: ff_utils.entry('zap_fcr');
1844: end if;
1845:
1846: ff_utils.assert(p_fmla_info.exists(p_free_slot), 'zap_fcr:1');
1847:

Line 1846: ff_utils.assert(p_fmla_info.exists(p_free_slot), 'zap_fcr:1');

1842: if g_debug then
1843: ff_utils.entry('zap_fcr');
1844: end if;
1845:
1846: ff_utils.assert(p_fmla_info.exists(p_free_slot), 'zap_fcr:1');
1847:
1848: --
1849: -- Check that this slot has not been zapped previously.
1850: --

Line 1879: ff_utils.exit('zap_fcr');

1875: p_fmla_info(p_free_slot).fdiu_count := null;
1876: p_fmla_info(p_free_slot).first_fdiu := null;
1877:
1878: if g_debug then
1879: ff_utils.exit('zap_fcr');
1880: end if;
1881:
1882: end zap_fcr;
1883:

Line 1887: ff_utils.entry('load_formula');

1883:
1884: begin
1885:
1886: if g_debug then
1887: ff_utils.entry('load_formula');
1888: end if;
1889:
1890: /*
1891: * Load formula information into internal structures.

Line 1957: ff_utils.exit('load_formula');

1953: -- Reset the LRU slot.
1954: set_lru_slot(p_fmla_lookups, p_exec_info, l_cache_slot, p_lru_slot);
1955:
1956: if g_debug then
1957: ff_utils.exit('load_formula');
1958: end if;
1959:
1960: end load_formula;
1961:

Line 1982: ff_utils.entry('invalidate_db_items');

1978: l_index binary_integer;
1979: l_path binary_integer;
1980: begin
1981: if g_debug then
1982: ff_utils.entry('invalidate_db_items');
1983: end if;
1984:
1985: if p_context_sum1 <> 0 and p_context_sum2 = 0 then
1986: l_path := 1;

Line 2069: ff_utils.exit('invalidate_db_items');

2065: end loop;
2066: end if;
2067:
2068: if g_debug then
2069: ff_utils.exit('invalidate_db_items');
2070: end if;
2071:
2072: end invalidate_db_items;
2073:

Line 2121: ff_utils.entry('bind_variables');

2117: l_in_index binary_integer; -- only interested in count of inputs.
2118: begin
2119:
2120: if g_debug then
2121: ff_utils.entry('bind_variables');
2122: end if;
2123:
2124: l_context_total1 := 0;
2125: l_context_total2 := 0;

Line 2242: ff_utils.assert((l_tvalue is not null), 'bind_variables:1');

2238:
2239: end if;
2240:
2241: -- Following all this, value should NOT be null.
2242: ff_utils.assert((l_tvalue is not null), 'bind_variables:1');
2243:
2244: elsif(l_usage in ('I', 'B')) then
2245: /* An input variable (or input and output). */
2246: l_in_index := l_in_index + 1; -- Count index of inputs table.

Line 2286: ff_utils.assert(FALSE, 'bind_variables:2');

2282: l_indic_value := FF_NULL;
2283: end if;
2284: else
2285: -- Houston, we have a problem.
2286: ff_utils.assert(FALSE, 'bind_variables:2');
2287: end if;
2288:
2289: /*
2290: * Bind the appropriate variable (and indicator)

Line 2326: ff_utils.exit('bind_variables');

2322: end if;
2323: end loop;
2324:
2325: if g_debug then
2326: ff_utils.exit('bind_variables');
2327: end if;
2328:
2329: end bind_variables;
2330:

Line 2366: ff_utils.entry('set_outputs');

2362: l_value varchar2(255); -- matches ff_exec.FF_BIND_LEN
2363: begin
2364:
2365: if g_debug then
2366: ff_utils.entry('set_outputs');
2367: end if;
2368:
2369: /*
2370: * Set the output table from returned values.

Line 2465: ff_utils.exit('set_outputs');

2461:
2462: end loop;
2463:
2464: if g_debug then
2465: ff_utils.exit('set_outputs');
2466: end if;
2467:
2468: exception
2469: when others then

Line 2573: ff_utils.entry('init_formula');

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:
2576: if g_debug then
2577: hr_utility.trace('fmla cache size: ' || g_exec_info.fmla_cache_size);

Line 2632: ff_utils.exit('init_formula');

2628: g_exec_info.input_rows := p_inputs.count;
2629: g_exec_info.output_rows := p_outputs.count;
2630:
2631: if g_debug then
2632: ff_utils.exit('init_formula');
2633: end if;
2634:
2635: end init_formula;
2636:

Line 2670: ff_utils.entry('run_formula');

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:
2673: -- Check that the execution engine is initialised.
2674: if(g_exec_info.formula_id is null) then

Line 2682: ff_utils.assert((g_exec_info.input_rows = p_inputs.count), 'run_formula:1');

2678:
2679: -- Sanity checks on the number of rows in the
2680: -- inputs and outputs tables. This helps to
2681: -- ensure the caller hasn't messed with them.
2682: ff_utils.assert((g_exec_info.input_rows = p_inputs.count), 'run_formula:1');
2683: ff_utils.assert((g_exec_info.output_rows = p_outputs.count), 'run_formula:2');
2684:
2685: /*
2686: * Set up a few useful variables.

Line 2683: ff_utils.assert((g_exec_info.output_rows = p_outputs.count), 'run_formula:2');

2679: -- Sanity checks on the number of rows in the
2680: -- inputs and outputs tables. This helps to
2681: -- ensure the caller hasn't messed with them.
2682: ff_utils.assert((g_exec_info.input_rows = p_inputs.count), 'run_formula:1');
2683: ff_utils.assert((g_exec_info.output_rows = p_outputs.count), 'run_formula:2');
2684:
2685: /*
2686: * Set up a few useful variables.
2687: */

Line 2839: ff_utils.exit('run_formula');

2835: * table and be able to process them.
2836: */
2837:
2838: if g_debug then
2839: ff_utils.exit('run_formula');
2840: end if;
2841:
2842: end run_formula;
2843: