DBA Data[Home] [Help]

PACKAGE: APPS.AK_FLOW2_PVT

Source


1 package AK_FLOW2_PVT as
2 /* $Header: akdvfl2s.pls 120.2 2005/09/15 22:26:50 tshort ship $ */
3 
4 -- Global constants holding the package and file names to be used by
5 -- messaging routines in the case of an unexpected error.
6 
7 G_PKG_NAME      CONSTANT    VARCHAR2(30) := 'AK_FLOW2_PVT';
8 
9 -- PL/SQL table for holding records that need to be processed
10 -- the second time in UPLOAD
11 G_FLOW_REDO_TBL             AK_FLOW_PUB.Flow_Tbl_Type;
12 G_PAGE_REDO_TBL		        AK_FLOW_PUB.Page_Tbl_Type;
13 G_PAGE_REGION_REDO_TBL      AK_FLOW_PUB.Page_Region_Tbl_Type;
14 G_PAGE_REGION_ITEM_REDO_TBL AK_FLOW_PUB.Page_Region_Item_Tbl_Type;
15 G_REGION_RELATION_REDO_TBL  AK_FLOW_PUB.Region_Relation_Tbl_Type;
16 --
17 -- Pointer to redo tables
18 G_FLOW_REDO_INDEX           NUMBER := 0;
19 G_PAGE_REDO_INDEX           NUMBER := 0;
20 G_PAGE_REGION_REDO_INDEX    NUMBER := 0;
21 G_PAGE_REGION_ITEM_REDO_INDEX NUMBER := 0;
22 G_REGION_RELATION_REDO_INDEX  NUMBER := 0;
23 
24 --=======================================================
25 --  Procedure   DOWNLOAD_FLOW
26 --
27 --  Usage       Private API for downloading flows. This
28 --              API should only be called by other APIs that are
29 --              owned by the Core Modules Team (AK).
30 --
31 --  Desc        This API will extract the flows selected
32 --              by application ID or by key values from the
33 --              database to the output file.
34 --              If a flow is selected for writing to the loader
35 --              file, all its children records (including flow pages,
36 --              flow page regions, flow page region items, and flow
37 --              region relations) will also be written.
38 --
39 --  Results     The API returns the standard p_return_status parameter
40 --              indicating one of the standard return statuses :
41 --                  * Unexpected error
42 --                  * Error
43 --                  * Success
44 --  Parameters
45 --              p_nls_language : IN optional
46 --                  NLS language for database. If none if given,
47 --                  the current NLS language will be used.
48 --
49 --              One of the following parameters must be provided:
50 --
51 --              p_application_id : IN optional
52 --                  If given, all attributes for this application ID
53 --                  will be written to the output file.
54 --                  p_application_id will be ignored if a table is
55 --                  given in p_flow_pk_tbl.
56 --              p_flow_pk_tbl : IN optional
57 --                  If given, only flows whose key values are
58 --                  included in this table will be written to the
59 --                  output file.
60 --
61 --  Version     Initial version number  =   1.0
62 --  History     Current version number  =   1.0
63 --=======================================================
64 procedure DOWNLOAD_FLOW (
65   p_validation_level         IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
66   p_api_version_number       IN      NUMBER,
67   p_return_status            OUT NOCOPY    VARCHAR2,
68   p_application_id           IN      NUMBER := FND_API.G_MISS_NUM,
69   p_flow_pk_tbl              IN      AK_FLOW_PUB.Flow_PK_Tbl_Type
70                                     := AK_FLOW_PUB.G_MISS_FLOW_PK_TBL,
71   p_nls_language             IN      VARCHAR2
72 );
73 
74 --=======================================================
75 --  Procedure   UPLOAD_FLOW
76 --
77 --  Usage       Private API for loading flows from a
78 --              loader file to the database.
79 --              This API should only be called by other APIs
80 --              that are owned by the Core Modules Team (AK).
81 --
82 --  Desc        This API reads the flow data (including flow pages,
83 --              flow page regions, flow page region items, and
84 --              flow region relations) stored in the loader file
85 --              currently being processed, parses the data, and
86 --              loads them to the database. The tables
87 --              are updated with the timestamp passed. This API
88 --              will process the file until the EOF is reached,
89 --              a parse error is encountered, or when data for
90 --              a different business object is read from the file.
91 --
92 --  Results     The API returns the standard p_return_status parameter
93 --              indicating one of the standard return statuses :
94 --                  * Unexpected error
95 --                  * Error
96 --                  * Success
97 --  Parameters  p_index : IN OUTrequired
98 --                  Index of PL/SQL file to be processed.
99 --              p_loader_timestamp : IN required
100 --                  The timestamp to be used when creating or updating
101 --                  records
102 --              p_line_num : IN optional
103 --                  The first line number in the file to be processed.
104 --                  It is used for keeping track of the line number
105 --                  read so that this info can be included in the
106 --                  error message when a parse error occurred.
107 --              p_buffer : IN required
108 --                  The content of the first line to be processed.
109 --                  The calling API has already read the first line
110 --                  that needs to be parsed by this API, so this
111 --                  line won't be read from the file again.
112 --              p_line_num_out : OUT
113 --                  The number of the last line in the loader file
114 --                  that is read by this API.
115 --              p_buffer_out : OUT
116 --                  The content of the last line read by this API.
117 --                  If an EOF has not reached, this line would
118 --                  contain the beginning of another business object
119 --                  that will need to be processed by another API.
120 --
121 --  Version     Initial version number  =   1.0
122 --  History     Current version number  =   1.0
123 --=======================================================
124 procedure UPLOAD_FLOW (
125   p_validation_level         IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
126   p_api_version_number       IN      NUMBER,
127   p_return_status            OUT NOCOPY    VARCHAR2,
128   p_index                    IN OUT NOCOPY NUMBER,
129   p_loader_timestamp         IN      DATE,
130   p_line_num                 IN      NUMBER := FND_API.G_MISS_NUM,
131   p_buffer                   IN      AK_ON_OBJECTS_PUB.Buffer_Type,
132   p_line_num_out             OUT NOCOPY    NUMBER,
133   p_buffer_out               OUT NOCOPY    AK_ON_OBJECTS_PUB.Buffer_Type,
134   p_upl_loader_cur           IN OUT NOCOPY AK_ON_OBJECTS_PUB.LoaderCurTyp,
135   p_pass                     IN      NUMBER := 1
136 );
137 
138 --=======================================================
139 --  Procedure   UPLOAD_FLOW_SECOND
140 --
141 --  Usage       Private API for loading flows that were
142 --              failed during its first pass
143 --              This API should only be called by other APIs
144 --              that are owned by the Core Modules Team (AK).
145 --
146 --  Desc        This API reads the flow data from PL/SQL table
147 --              that was prepared during 1st pass, then processes
148 --              the data, and loads them to the database. The tables
149 --              are updated with the timestamp passed. This API
150 --              will process the file until the EOF is reached,
151 --              a parse error is encountered, or when data for
152 --              a different business object is read from the file.
153 --
154 --  Results     The API returns the standard p_return_status parameter
155 --              indicating one of the standard return statuses :
156 --                  * Unexpected error
157 --                  * Error
158 --                  * Success
159 --  Parameters  p_validation_level : IN required
160 --                  validation level
161 --
162 --  Version     Initial version number  =   1.0
163 --  History     Current version number  =   1.0
164 --=======================================================
165 procedure UPLOAD_FLOW_SECOND (
166   p_validation_level         IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
167   p_return_status            OUT NOCOPY    VARCHAR2,
168   p_loader_timestamp         IN      DATE := FND_API.G_MISS_DATE,
169   p_pass                     IN      NUMBER := 2
170 );
171 
172 end AK_FLOW2_PVT;