DBA Data[Home] [Help]

APPS.FF_EXEC dependencies on FF_EXEC

Line 1: package body ff_exec as

1: package body ff_exec as
2: /* $Header: ffexec.pkb 120.4.12000000.1 2007/01/17 17:44:40 appldev noship $ */
3: /*
4: NOTES
5: See ffrunf.lld for design documentation.

Line 196: tvalue varchar2(255), -- matches ff_exec.FF_BIND_LEN

192: context_level2 binary_integer,
193: data_type varchar2(10),
194: dvalue date,
195: nvalue number,
196: tvalue varchar2(255), -- matches ff_exec.FF_BIND_LEN
197: indicator binary_integer
198: );
199:
200: type dbi_cache_t is table of dbi_cache_r index by binary_integer;

Line 348: l_debug_level := l_debug_level + ff_exec.FF_DBG;

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;
349: end if;
350:
351: if(l_ff_cache) then
352: l_debug_level := l_debug_level + ff_exec.FF_CACHE_DBG;

Line 352: l_debug_level := l_debug_level + ff_exec.FF_CACHE_DBG;

348: l_debug_level := l_debug_level + ff_exec.FF_DBG;
349: end if;
350:
351: if(l_ff_cache) then
352: l_debug_level := l_debug_level + ff_exec.FF_CACHE_DBG;
353: end if;
354:
355: if(l_dbi_cache) then
356: l_debug_level := l_debug_level + ff_exec.DBI_CACHE_DBG;

Line 356: l_debug_level := l_debug_level + ff_exec.DBI_CACHE_DBG;

352: l_debug_level := l_debug_level + ff_exec.FF_CACHE_DBG;
353: end if;
354:
355: if(l_dbi_cache) then
356: l_debug_level := l_debug_level + ff_exec.DBI_CACHE_DBG;
357: end if;
358:
359: if(l_mru) then
360: l_debug_level := l_debug_level + ff_exec.MRU_DBG;

Line 360: l_debug_level := l_debug_level + ff_exec.MRU_DBG;

356: l_debug_level := l_debug_level + ff_exec.DBI_CACHE_DBG;
357: end if;
358:
359: if(l_mru) then
360: l_debug_level := l_debug_level + ff_exec.MRU_DBG;
361: end if;
362:
363: if(l_io) then
364: l_debug_level := l_debug_level + ff_exec.IO_TABLE_DBG;

Line 364: l_debug_level := l_debug_level + ff_exec.IO_TABLE_DBG;

360: l_debug_level := l_debug_level + ff_exec.MRU_DBG;
361: end if;
362:
363: if(l_io) then
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;

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 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 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 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 685: p_inputs in ff_exec.inputs_t,

681: * Input and Output table information.
682: */
683: procedure io_table_debug
684: (
685: p_inputs in ff_exec.inputs_t,
686: p_outputs in ff_exec.outputs_t,
687: p_type in varchar2
688: ) is
689: l_index varchar2(20);

Line 686: p_outputs in ff_exec.outputs_t,

682: */
683: procedure io_table_debug
684: (
685: p_inputs in ff_exec.inputs_t,
686: p_outputs in ff_exec.outputs_t,
687: p_type in varchar2
688: ) is
689: l_index varchar2(20);
690: name varchar2(240);

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 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 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 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 1949: ff_exec.context_count := p_fmla_info(l_cache_slot).context_count;

1945: p_exec_info.effective_date := p_effective_date;
1946:
1947: -- Indicate to outside world how many contexts, inputs and
1948: -- outputs the formula is expecting.
1949: ff_exec.context_count := p_fmla_info(l_cache_slot).context_count;
1950: ff_exec.input_count := p_fmla_info(l_cache_slot).input_count;
1951: ff_exec.output_count := p_fmla_info(l_cache_slot).output_count;
1952:
1953: -- Reset the LRU slot.

Line 1950: ff_exec.input_count := p_fmla_info(l_cache_slot).input_count;

1946:
1947: -- Indicate to outside world how many contexts, inputs and
1948: -- outputs the formula is expecting.
1949: ff_exec.context_count := p_fmla_info(l_cache_slot).context_count;
1950: ff_exec.input_count := p_fmla_info(l_cache_slot).input_count;
1951: ff_exec.output_count := p_fmla_info(l_cache_slot).output_count;
1952:
1953: -- Reset the LRU slot.
1954: set_lru_slot(p_fmla_lookups, p_exec_info, l_cache_slot, p_lru_slot);

Line 1951: ff_exec.output_count := p_fmla_info(l_cache_slot).output_count;

1947: -- Indicate to outside world how many contexts, inputs and
1948: -- outputs the formula is expecting.
1949: ff_exec.context_count := p_fmla_info(l_cache_slot).context_count;
1950: ff_exec.input_count := p_fmla_info(l_cache_slot).input_count;
1951: ff_exec.output_count := p_fmla_info(l_cache_slot).output_count;
1952:
1953: -- Reset the LRU slot.
1954: set_lru_slot(p_fmla_lookups, p_exec_info, l_cache_slot, p_lru_slot);
1955:

Line 2087: p_inputs in ff_exec.inputs_t,

2083:
2084: procedure bind_variables
2085: (
2086: p_cache_slot in binary_integer,
2087: p_inputs in ff_exec.inputs_t,
2088: p_outputs in ff_exec.outputs_t,
2089: p_fmla_info in fmla_info_t,
2090: p_fdiu_info in fdiu_info_t,
2091: p_ctx_info in out nocopy dbi_cache_t,

Line 2088: p_outputs in ff_exec.outputs_t,

2084: procedure bind_variables
2085: (
2086: p_cache_slot in binary_integer,
2087: p_inputs in ff_exec.inputs_t,
2088: p_outputs in ff_exec.outputs_t,
2089: p_fmla_info in fmla_info_t,
2090: p_fdiu_info in fdiu_info_t,
2091: p_ctx_info in out nocopy dbi_cache_t,
2092: p_d in out nocopy ff_wrapper_pkg.t_date,

Line 2110: l_tvalue varchar2(255); -- matches ff_exec.FF_BIND_LEN

2106: l_indpos binary_integer;
2107: l_indic_value binary_integer;
2108: l_dvalue date;
2109: l_nvalue number;
2110: l_tvalue varchar2(255); -- matches ff_exec.FF_BIND_LEN
2111: l_data_type varchar2(7);
2112: l_usage varchar2(1);
2113: l_context_id binary_integer; -- context_id.
2114: l_context_sum1 binary_integer;

Line 2349: p_outputs in out nocopy ff_exec.outputs_t

2345: p_d in ff_wrapper_pkg.t_date,
2346: p_n in ff_wrapper_pkg.t_number,
2347: p_t in ff_wrapper_pkg.t_text,
2348: p_i in ff_wrapper_pkg.t_number,
2349: p_outputs in out nocopy ff_exec.outputs_t
2350: ) is
2351: l_first_fdiu binary_integer;
2352: l_last_fdiu binary_integer;
2353: l_count_fdiu binary_integer;

Line 2362: l_value varchar2(255); -- matches ff_exec.FF_BIND_LEN

2358: l_usage varchar2(1);
2359: l_data_type varchar2(6);
2360: l_dvalue date;
2361: l_nvalue number;
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');

Line 2472: -- filled-in values now that FF_EXEC.RUN_FORMULA is passing them in

2468: exception
2469: when others then
2470: --
2471: -- NOCOPY change. The issue is to avoid the FF Outputs having partially
2472: -- filled-in values now that FF_EXEC.RUN_FORMULA is passing them in
2473: -- by reference i.e. using NOCOPY.
2474: -- Solution: Set the outputs to NULL.
2475: --
2476: l_out_index := 0;

Line 2558: p_inputs in out nocopy ff_exec.inputs_t,

2554: procedure init_formula
2555: (
2556: p_formula_id in number,
2557: p_effective_date in date,
2558: p_inputs in out nocopy ff_exec.inputs_t,
2559: p_outputs in out nocopy ff_exec.outputs_t
2560: ) is
2561: l_count binary_integer;
2562: l_first_fdiu binary_integer;

Line 2559: p_outputs in out nocopy ff_exec.outputs_t

2555: (
2556: p_formula_id in number,
2557: p_effective_date in date,
2558: p_inputs in out nocopy ff_exec.inputs_t,
2559: p_outputs in out nocopy ff_exec.outputs_t
2560: ) is
2561: l_count binary_integer;
2562: l_first_fdiu binary_integer;
2563: l_last_fdiu binary_integer;

Line 2649: p_inputs in ff_exec.inputs_t,

2645: */
2646:
2647: procedure run_formula
2648: (
2649: p_inputs in ff_exec.inputs_t,
2650: p_outputs in out nocopy ff_exec.outputs_t,
2651: p_use_dbi_cache in boolean default true
2652: ) is
2653: l_formula_id number;

Line 2650: p_outputs in out nocopy ff_exec.outputs_t,

2646:
2647: procedure run_formula
2648: (
2649: p_inputs in ff_exec.inputs_t,
2650: p_outputs in out nocopy ff_exec.outputs_t,
2651: p_use_dbi_cache in boolean default true
2652: ) is
2653: l_formula_id number;
2654: l_cache_slot binary_integer;

Line 2852: end ff_exec;

2848: --
2849: -- Set the formula caches to their initial values.
2850: --
2851: reset_caches;
2852: end ff_exec;