DBA Data[Home] [Help]

PACKAGE: APPS.FND_OAM_DSCRAM_BUNDLES_PKG

Source


1 PACKAGE FND_OAM_DSCRAM_BUNDLES_PKG as
2 /* $Header: AFOAMDSBDLS.pls 120.3 2005/12/19 09:37 ilawler noship $ */
3 
4    ------------
5    -- Constants
6    ------------
7 
8    ---------------------------------
9    -- Public Procedures/Functions --
10    ---------------------------------
11 
12    -- Accessor function to obtain parts of the bundle state
13    -- Invariants:
14    --   State must have been initialized by a prior call to execute_bundle in the session.
15    -- Parameters:
16    --   None
17    -- Returns:
18    --   The numerical ID of the bundle to which this session is assigned.
19    -- Exceptions:
20    --   If a prior call to execute_bundle wasn't executed, a NO_DATA_FOUND exception is thrown.
21    FUNCTION GET_BUNDLE_ID
22       RETURN NUMBER;
23 
24    -- Accessor function to obtain parts of the bundle state
25    -- Invariants:
26    --   State must have been initialized by a prior call to execute_bundle in the session.
27    -- Parameters:
28    --   None
29    -- Returns:
30    --   The numerical ID of the worker assigned to this bundle in this session.
31    -- Exceptions:
32    --   If a prior call to execute_bundle wasn't executed, a NO_DATA_FOUND exception is thrown.
33    FUNCTION GET_WORKER_ID
34       RETURN NUMBER;
35 
36    -- Accessor function to obtain parts of the bundle state
37    -- Invariants:
38    --   State must have been initialized by a prior call to execute_bundle in the session.
39    -- Parameters:
40    --   None
41    -- Returns:
42    --   The number of concurrent workers allowed for this bundle.
43    -- Exceptions:
44    --   If a prior call to execute_bundle wasn't executed, a NO_DATA_FOUND exception is thrown.
45    FUNCTION GET_WORKERS_ALLOWED
46       RETURN NUMBER;
47 
48    -- Accessor function to obtain parts of the bundle state
49    -- Invariants:
50    --   State must have been initialized by a prior call to execute_bundle in the session.
51    -- Parameters:
52    --   None
53    -- Returns:
54    --   The default batch size (unit = # of rows) for an AD API unit
55    -- Exceptions:
56    --   If a prior call to execute_bundle wasn't executed, a NO_DATA_FOUND exception is thrown.
57    FUNCTION GET_BATCH_SIZE
58       RETURN NUMBER;
59 
60    -- Accessor function to obtain parts of the bundle state
61    -- Invariants:
62    --   State must have been initialized by a prior call to execute_bundle in the session.
63    -- Parameters:
64    --   None
65    -- Returns:
66    --   The minimum weight required for a bundle's unit to suggest parallelization.
67    -- Exceptions:
68    --   If a prior call to execute_bundle wasn't executed, a NO_DATA_FOUND exception is thrown.
69    FUNCTION GET_MIN_PARALLEL_UNIT_WEIGHT
70       RETURN NUMBER;
71 
72    -- API used to validate the currently executing bundle, consumed by _TASKS_PKG.  Similar to other
73    -- VALIDATE_CONTINUED_EXECUTION methods it checks if the bundle should continue executing.
74    -- It may also check the run if p_recurse is set.
75    -- Invariants:
76    --   Internal Assign should have already occured to set up the bundle state.
77    -- Parameters:
78    --   p_force_query     Force a query of the entities, typically done after we've seen an error.
79    --   p_recurse         Whether to check parent entities (run)
80    --   x_return_status:  FND_API-compliant return status
81    --   x_return_msg:     Message explaining non-success return statuses
82    FUNCTION VALIDATE_CONTINUED_EXECUTION(p_force_query          IN BOOLEAN,
83                                          p_recurse              IN BOOLEAN,
84                                          x_return_status        OUT NOCOPY VARCHAR2,
85                                          x_return_msg           OUT NOCOPY VARCHAR2)
86       RETURN BOOLEAN;
87 
88    -- Entry point for a scramble to launch a worker for a specific run's bundle.
89    -- Each invocation of execute_bundle continues until the bundle has been determined to be
90    -- finished.  If workers are unable to find tasks available for execution in a bundle but the
91    -- bundle is not finished, the worker waits for a progress update alert from another worker or
92    -- until a timeout is hit.
93    -- Invariants:
94    --   None
95    -- Parameters:
96    --   p_run_id:         DSCRAM_RUNS.RUN_ID to which this worker is assigned
97    --   p_bundle_id:      DSCRAM_BUNDLES.BUNDLE_ID to which this worker is assigned
98    --   p_worker_id:      Numeric ID of this worker, on first invocation must be null, restarts of the worker
99    --                     should specify the previously returned ID to keep counters valid.
100    --   x_return_status:  FND_API-compliant return status
101    --   x_return_msg:     Message explaining non-success return statuses
102    PROCEDURE EXECUTE_BUNDLE(p_run_id            IN NUMBER,
103                             p_bundle_id         IN NUMBER,
104                             px_worker_id        IN OUT NOCOPY NUMBER,
105                             x_return_status     OUT NOCOPY VARCHAR2,
106                             x_return_msg        OUT NOCOPY VARCHAR2);
107 
108    -- Wrapper on top of EXECUTE_BUNDLE to query the bundles for this host using the given
109    -- run_id and execute each serially.  This simplifies our callout from controller code.
110    -- Invariants:
111    --   None
112    -- Parameters:
113    --   p_run_id:         DSCRAM_RUNS.RUN_ID to which this worker is assigned
114    --   p_worker_id:      Numeric ID of this worker, on first invocation must be null, restarts of the worker
115    --                     should specify the previously returned ID to keep counters valid.
116    --   x_return_status:  FND_API-compliant return status
117    --   x_return_msg:     Message explaining non-success return statuses
118    PROCEDURE EXECUTE_HOST_BUNDLES(p_run_id              IN NUMBER,
119                                   px_worker_id          IN OUT NOCOPY NUMBER,
120                                   x_return_status       OUT NOCOPY VARCHAR2,
121                                   x_return_msg          OUT NOCOPY VARCHAR2);
122 
123 END FND_OAM_DSCRAM_BUNDLES_PKG;