DBA Data[Home] [Help]

PACKAGE: APPS.FND_OAM_DSCRAM_DIAG_PKG

Source


1 PACKAGE FND_OAM_DSCRAM_DIAG_PKG as
2 /* $Header: AFOAMDSDIAGS.pls 120.3 2005/11/01 17:00 ilawler noship $ */
3 
4    ------------
5    -- Constants
6    ------------
7 
8    ---------------------------------
9    -- Public Procedures/Functions --
10    ---------------------------------
11    -- Deletes all runs with ids in the diagnostic range, includes delete of all dependent
12    -- entities by using UTILS_PKG.DELETE_RUN.
13    PROCEDURE DELETE_ALL_DIAGNOSTIC_RUNS(x_verdict OUT NOCOPY VARCHAR2);
14 
15    -- Test 1: create run, bundle, task with no units, sanity check traversal
16    -- of higher level entities;
17    PROCEDURE EXECUTE_TEST1(p_run_id             IN NUMBER DEFAULT 1,
18                            p_bundle_id          IN NUMBER DEFAULT 1,
19                            p_num_bundles        IN NUMBER DEFAULT 1,
20                            p_num_workers        IN NUMBER DEFAULT 1,
21                            x_verdict            OUT NOCOPY VARCHAR2);
22 
23    -- Test 2: create run, bundle, task, dml unit with no associated DMLs, make sure
24    -- it does all the queries down to the lowest entity and finds no work so it sets
25    -- all entities to processed on the way out.
26    PROCEDURE EXECUTE_TEST2(p_run_id             IN NUMBER DEFAULT 1,
27                            p_bundle_id          IN NUMBER DEFAULT 1,
28                            p_num_bundles        IN NUMBER DEFAULT 1,
29                            p_num_workers        IN NUMBER DEFAULT 1,
30                            x_verdict            OUT NOCOPY VARCHAR2);
31 
32    -- Test 3: creates a global arg and multiple run args, some dynamic. Since the
33    -- test is in a diagnostic mode, print_arg_context is called to initialize and print
34    -- all the args to the log.  Make sure the read-only dynamic args have different values
35    -- for each worker and the read-write dynamic args have the same value.  Tests the
36    -- different datatypes for args as well. Args get more serious, checked testing later
37    -- on, this is meant as a sanity check.
38    PROCEDURE EXECUTE_TEST3(p_run_id             IN NUMBER DEFAULT 1,
39                            p_bundle_id          IN NUMBER DEFAULT 1,
40                            p_num_bundles        IN NUMBER DEFAULT 1,
41                            p_num_workers        IN NUMBER DEFAULT 1,
42                            x_verdict            OUT NOCOPY VARCHAR2);
43 
44    -- Test 4: creates 5 tasks, each task containing between 0 and 4 units.  Each unit
45    -- has a suggested number of workers of 1 or 2.  More exacting test of the scheduling logic
46    -- including handling FULL tasks.
47    PROCEDURE EXECUTE_TEST4(p_run_id             IN NUMBER DEFAULT 1,
48                            p_bundle_id          IN NUMBER DEFAULT 1,
49                            p_num_bundles        IN NUMBER DEFAULT 1,
50                            p_num_workers        IN NUMBER DEFAULT 1,
51                            x_verdict            OUT NOCOPY VARCHAR2);
52 
53    -- Test 5: creates a test table and a simple update DML which is forced to
54    -- execute serially.  No input arguments, but sql output
55    -- arguments are used to check the results of the update.
56    PROCEDURE EXECUTE_TEST5(p_run_id             IN NUMBER DEFAULT 1,
57                            p_bundle_id          IN NUMBER DEFAULT 1,
58                            p_num_bundles        IN NUMBER DEFAULT 1,
59                            p_num_workers        IN NUMBER DEFAULT 1,
60                            x_verdict            OUT NOCOPY VARCHAR2);
61 
62    -- Test 6: creates a test table and a simple update DML which is forced to
63    -- execute using ranges.  No input arguments, but output arguments are used
64    -- to check the results of the update dml per range along with outputs to fetch the c2 sum
65    -- at the end and roll that into a run context arg.
66    PROCEDURE EXECUTE_TEST6(p_run_id             IN NUMBER DEFAULT 1,
67                            p_bundle_id          IN NUMBER DEFAULT 1,
68                            p_num_bundles        IN NUMBER DEFAULT 1,
69                            p_num_workers        IN NUMBER DEFAULT 1,
70                            x_verdict            OUT NOCOPY VARCHAR2);
71 
72    -- Test 7: creates a test table and executes 2 DML statements, a delete of
73    -- all the odd numbered rows and an update of the remaining rows to have
74    -- c2 = c2 + c1 + ARG(val=3).  Final C2 sum should be ((N*(N+2))/4 + 2N).
75    -- Also updates c3 to an ARG-sourced static string, c4 to an ARG-sourced static date. C3's value
76    -- is sourced from a readable run context arg executed on a range.
77    PROCEDURE EXECUTE_TEST7(p_run_id             IN NUMBER DEFAULT 1,
78                            p_bundle_id          IN NUMBER DEFAULT 1,
79                            p_num_bundles        IN NUMBER DEFAULT 1,
80                            p_num_workers        IN NUMBER DEFAULT 1,
81                            x_verdict            OUT NOCOPY VARCHAR2);
82 
83    -- Test 8: Creates a single run/bundle/task/unit with a plsql (TEST8_PROC1) that runs serially and requires
84    -- args with all the state args.  The procedure returns a single FND_API flag for success/failure
85    -- into an argument which is checked on execute completion. Tests serial pl/sql unit execution.
86    PROCEDURE EXECUTE_TEST8(p_run_id             IN NUMBER DEFAULT 1,
87                            p_bundle_id          IN NUMBER DEFAULT 1,
88                            p_num_bundles        IN NUMBER DEFAULT 1,
89                            p_num_workers        IN NUMBER DEFAULT 1,
90                            x_verdict            OUT NOCOPY VARCHAR2);
91 
92    -- Procedure used by TEST8 to validate unsplit PLSQL execution and the STATE-typed arguments.  Performes
93    -- queries on the runtime datamodel to verify that the values provided are consistent with each other.
94    PROCEDURE TEST8_PROC1(p_run_id               IN NUMBER,
95                          p_run_mode             IN VARCHAR2,
96                          p_bundle_id            IN NUMBER,
97                          p_bundle_workers_allowed       IN NUMBER,
98                          p_bundle_batch_size    IN NUMBER,
99                          p_worker_id            IN NUMBER,
100                          p_task_id              IN NUMBER,
101                          p_unit_id              IN NUMBER,
102                          p_using_splitting      IN VARCHAR2,
103                          p_rowid_lbound         IN ROWID,
104                          p_rowid_ubound         IN ROWID,
105                          p_unit_object_owner    IN VARCHAR2,
106                          p_unit_object_name     IN VARCHAR2,
107                          p_unit_workers_allowed IN NUMBER,
108                          p_unit_batch_size      IN NUMBER,
109                          p_plsql_id             IN NUMBER,
110                          p_arg_id               IN NUMBER,
111                          p_workers_allowed      IN NUMBER,
112                          p_batch_size           IN NUMBER,
113                          x_verdict              OUT NOCOPY VARCHAR2,
114                          x_return_msg           OUT NOCOPY VARCHAR2);
115 
116    -- Test 9: Creates a run/bundle/task/unit with a plsql (TEST9_PROC1) in phase 1 that uses
117    -- splitting to modify a table.  Also creates a second unit without a phase
118    -- under the same task which is a DML that uses an arg context value set by the plsql to
119    -- test dependency handling and pl/sql splitting.
120    PROCEDURE EXECUTE_TEST9(p_run_id             IN NUMBER DEFAULT 1,
121                            p_bundle_id          IN NUMBER DEFAULT 1,
122                            p_num_bundles        IN NUMBER DEFAULT 1,
123                            p_num_workers        IN NUMBER DEFAULT 1,
124                            x_verdict            OUT NOCOPY VARCHAR2);
125 
126    -- Procedure used by TEST9 to modify a test table.
127    PROCEDURE TEST9_PROC1(p_using_splitting      IN VARCHAR2,
128                          p_rowid_lbound         IN ROWID,
129                          p_rowid_ubound         IN ROWID,
130                          p_unit_object_owner    IN VARCHAR2,
131                          p_unit_object_name     IN VARCHAR2,
132                          x_verdict              OUT NOCOPY VARCHAR2,
133                          x_return_msg           OUT NOCOPY VARCHAR2);
134 
135    -- Test 10: Creates a single run/bundle/task with a single concurrent meta-unit.  This
136    -- meta-unit has 3 child units, 2 PLSQLs and a DML unit.  Each child unit has 2 operations
137    -- with different priorities, weights.  The goal is to test all parts of the concurrent
138    -- meta-unit processing by providing a test case where each range should execute the work
139    -- items in the order 3.2, 3.1, 2.2, 1.1, 1.2, 2.1.  Each work item modifies C2 in such a
140    -- way that the final sum must be a certain value.  Also tests a SQL_RESTRICTABLE argument
141    -- that also uses STATE-provided rowids to check consistency.
142    PROCEDURE EXECUTE_TEST10(p_run_id            IN NUMBER DEFAULT 1,
143                             p_bundle_id         IN NUMBER DEFAULT 1,
144                             p_num_bundles       IN NUMBER DEFAULT 1,
145                             p_num_workers       IN NUMBER DEFAULT 1,
146                             x_verdict           OUT NOCOPY VARCHAR2);
147 
148    -- Procedure used by TEST10
149    PROCEDURE TEST10_PROC1_1(p_using_splitting           IN VARCHAR2,
150                             p_rowid_lbound              IN ROWID,
151                             p_rowid_ubound              IN ROWID,
152                             p_unit_object_owner         IN VARCHAR2,
153                             p_unit_object_name          IN VARCHAR2);
154 
155    -- Procedure used by TEST10
156    PROCEDURE TEST10_PROC1_2(p_using_splitting           IN VARCHAR2,
157                             p_rowid_lbound              IN ROWID,
158                             p_rowid_ubound              IN ROWID,
159                             p_unit_object_owner         IN VARCHAR2,
160                             p_unit_object_name          IN VARCHAR2);
161 
162    -- Function used by TEST10
163    FUNCTION TEST10_FUNC2_2(p_using_splitting            IN VARCHAR2,
164                            p_rowid_lbound               IN ROWID,
165                            p_rowid_ubound               IN ROWID,
166                            p_unit_object_owner          IN VARCHAR2,
167                            p_unit_object_name           IN VARCHAR2)
168       RETURN NUMBER;
169 
170    -- Procedure used by TEST10
171    PROCEDURE TEST10_PROC3_1(p_using_splitting           IN VARCHAR2,
172                             p_rowid_lbound              IN ROWID,
173                             p_rowid_ubound              IN ROWID,
174                             p_unit_object_owner         IN VARCHAR2,
175                             p_unit_object_name          IN VARCHAR2);
176 
177    -- Procedure used by TEST10
178    PROCEDURE TEST10_PROC3_2(p_using_splitting           IN VARCHAR2,
179                             p_rowid_lbound              IN ROWID,
180                             p_rowid_ubound              IN ROWID,
181                             p_unit_object_owner         IN VARCHAR2,
182                             p_unit_object_name          IN VARCHAR2);
183 
184    --Execute all configured tests
185    PROCEDURE EXECUTE_ALL_TESTS(p_run_id                         IN NUMBER DEFAULT 1,
186                                p_bundle_id                      IN NUMBER DEFAULT 1,
187                                p_num_bundles                    IN NUMBER DEFAULT 1,
188                                p_num_workers                    IN NUMBER DEFAULT 1,
189                                p_fail_fast                      IN VARCHAR2 DEFAULT NULL,
190                                p_execute_real_table_tests       IN VARCHAR2 DEFAULT NULL,
191                                x_verdict                        OUT NOCOPY VARCHAR2);
192 
193 END FND_OAM_DSCRAM_DIAG_PKG;