DBA Data[Home] [Help]

PACKAGE: APPS.CTO_WORKFLOW

Source


1 package CTO_WORKFLOW AUTHID CURRENT_USER as
2 /* $Header: CTOWKFLS.pls 120.1 2005/06/03 11:20:30 appldev  $ */
3 /*============================================================================+
4 |  Copyright (c) 1993 Oracle Corporation    Belmont, California, USA          |
5 |                        All rights reserved.                                 |
6 |                        Oracle Manufacturing                                 |
7 +=============================================================================+
8 |                                                                             |
9 | FILE NAME   : CTOWKFLS.pls                                                  |
10 | DESCRIPTION :                                                               |
11 |               This file creates package procedures that are called for each |
12 |               ATO Workflow activity.                                        |
13 |                                                                             |
14 |               BOM_CTO_WF_API.match_config_wf                              |
15 |               Procedure called from the Workflow Engine upon executing the  |
16 |               Match activity in the ATO process.  It does some preliminary  |
17 |               checks to verify that the order line is eligible to be        |
18 |               matched before calling the matching logic in function         |
19 |               BOM_MATCH_CONFIG.check_config_match.  If a match is found,    |
20 |               it links the match to the order line and updates the workflow.|
21 |                                                                             |
22                 BOM_CTO_WF_API.reserve_config_wf                            |
23 |                                                                             |
24 |               BOM_MATCH_CONFIG.create_config_wf                             |
25 |                                                                             |
26 |               BOM_CTO_WF_API.create_routing_wf                            |
27 |                                                                             |
28 |               BOM_CTO_WF_API.calculate_leadtime_wf                        |
29 |                                                                             |
30 |                                                                             |
31 |                                                                             |
32 | HISTORY     : 03/26/99      Initial Version                                 |
33 |
34 |               06/04/02      bugfix2327972
35 |                             added a new function node which calls procedure
36 |                             chk_rsv_after_afas_wf
37 |                             This nodes checks if any type of reservation
38 |                             exists. Node has been added in warning path after
39 |                             autocreate fas node
40 |
41 |
42 |              11/14/2003    Kiran Konada
43 |                            removed proceduset_parameter_lead_time_wf
44 |                            bcos of bug#3202825
45 |
46 |              06/01/2005    Renga Kannan
47 |                            Added nocopy hint to all out parameters.
48 |
49 =============================================================================*/
50 
51 procedure create_config_item_wf(
52         p_itemtype      in      VARCHAR2, /* workflow item type */
53         p_itemkey       in      VARCHAR2, /* sales order line id */
54         p_actid         in      number,   /* ID number of WF activity */
55         p_funcmode      in      VARCHAR2, /* execution mode of WF activity */
56         x_result    out NoCopy  VARCHAR2  /* result of activity */
57         );
58 
59 PROCEDURE CREATE_RESERVATION(
60         p_mfg_org_id           in     number ,
61         p_top_model_line_id    in     number,
62         p_config_id            in     number ,
63         p_reservation_uom_code in     varchar2 ,
64         p_quantity_to_reserve  in     number,
65         p_schedule_ship_date   in     DATE,
66         p_mode                 in     varchar2 ,
67         x_reserve_status       out NoCopy   varchar2,
68         x_msg_count            out NoCopy   number ,
69         x_msg_data             out NoCopy   varchar2,
70         x_return_status        out NoCopy   varchar2
71 ) ;
72 
73 procedure check_reservation_status_wf(
74         p_itemtype        in      VARCHAR2, /*w workflow item type */
75         p_itemkey         in      VARCHAR2, /* config line id */
76         p_actid           in      NUMBER,   /* ID number of WF activity */
77         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
78         x_result    out NoCopy    VARCHAR2  /* result of activity */
79         );
80 
81 
82 
83 -- to be renamed after tested completely
84 procedure calculate_cost_rollup_wf_ml(
85         p_itemtype        in      VARCHAR2, /* internal name for item type */
86         p_itemkey         in      VARCHAR2, /* sales order line id  */
87         p_actid           in      number,   /* ID number of WF activity  */
88         p_funcmode        in      VARCHAR2, /* execution mode of WF act  */
89         x_result      out NoCopy  VARCHAR2  /* result of activity */
90         );
91 
92 
93 
94 -- to be renamed after tested completely
95 procedure set_parameter_lead_time_wf_ml(
96         p_itemtype        in      VARCHAR2, /* workflow item type */
97         p_itemkey         in      VARCHAR2, /* sales order line id */
98         p_actid           in      number,   /* ID number of WF activity */
99         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
100         x_result      out NoCopy  VARCHAR2  /* result of activity */
101         );
102 
103 
104 
105 PROCEDURE check_supply_type_wf(
106         p_itemtype        in      VARCHAR2, /* workflow item type */
107         p_itemkey         in      VARCHAR2, /* sales order line id */
108         p_actid           in      number,   /* ID number of WF activity */
109         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
110         x_result      out NoCopy  VARCHAR2  /* result of activity */
111         );
112 
113 /*============================================================================
114         Procedure:    create_flow_schedule__wf
115         Description:  This procedure gets called when executing the
116                       Create Flow Schedule  activity in the CTO workflow.
117 
118 	Parameters:
119 =============================================================================*/
120 PROCEDURE create_flow_schedule_wf(
121         p_itemtype        in      VARCHAR2, /* workflow item type */
122         p_itemkey         in      VARCHAR2, /* sales order line id */
123         p_actid           in      number,   /* ID number of WF activity */
124         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
125         x_result      out NoCopy  VARCHAR2  /* result of activity */
126         );
127 
128 
129 /*============================================================================
130         Procedure:    work_order_set_parameter_wf
131         Description:  This procedure gets called when executing the Set
132                       Parameter Work Order activity in the ATO workflow.
133 
134                       More to come...
135 	Parameters:
136 =============================================================================*/
137 procedure set_parameter_work_order_wf(
138         p_itemtype        in      VARCHAR2, /* workflow item type */
139         p_itemkey         in      VARCHAR2, /* sales order line id */
140         p_actid           in      number,   /* ID number of WF activity */
141         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
142         x_result      out NoCopy  VARCHAR2  /* result of activity */
143         );
144 
145 procedure submit_conc_prog_wf(
146         p_itemtype        in      VARCHAR2, /* workflow item type */
147         p_itemkey         in      VARCHAR2, /* sales order line id */
148         p_actid           in      number,   /* ID number of WF activity */
149         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
150         x_result     out  NoCopy  VARCHAR2  /* result of activity */
151         );
152 
153 PROCEDURE submit_and_continue_wf(
154         p_itemtype        in      VARCHAR2, /* workflow item type */
155         p_itemkey         in      VARCHAR2, /* sales order line id */
156         p_actid           in      number,   /* ID number of WF activity */
157         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
158         x_result      out NoCopy  VARCHAR2  /* result of activity */
159         );
160 
161 /*============================================================================
162 	Procedure:    validate_line
163 	Description:  This procedure gets called when executing the Match
164                       Configuration activity in the ATO workflow.  The
165                       format is follows the standard Workflow API format.
166 
167 		      More to come...
168 	Parameters:
169 =============================================================================*/
170 FUNCTION validate_line(
171         p_line_id   in number
172         )
173 RETURN boolean;
174 
175 /*============================================================================
176 	Procedure:    validate_line
177 	Description:  This procedure gets called when executing the Match
178                       Configuration activity in the ATO workflow.  The
179                       format is follows the standard Workflow API format.
180 
181 		      More to come...
182 	Parameters:
183 =============================================================================*/
184 FUNCTION validate_config_line(
185         p_config_line_id   in number
186         )
187 RETURN boolean;
188 
189 /*============================================================================
190         Procedure:    config_line_exists
191         Description:  This procedure gets called when executing the Match
192                       Configuration activity in the ATO workflow.  The
193                       format is follows the standard Workflow API format.
194 
195                       More to come...
196 
197         Parameters:
198 =============================================================================*/
199 FUNCTION config_line_exists(
200         p_model_line_id   in number
201         )
202 RETURN boolean;
203 
204 /*============================================================================
205         Procedure:    reservation_exists
206         Description:  This procedure gets called when executing the Match
207                       Configuration activity in the ATO workflow.  The
208                       format is follows the standard Workflow API format.
209 
210                       More to come...
211 
212         Parameters:
213 =============================================================================*/
214 FUNCTION reservation_exists(
215         p_config_line_id in number,
216         x_reserved_qty   out NoCopy number
217         )
218 RETURN boolean;
219 
220 FUNCTION flow_sch_exists(
221         plineid in number
222         )
223 RETURN boolean;
224 
225 Procedure  check_inv_rsv_exists
226  (
227          pLineId          in     number    ,
228          x_ResultStatus   out  Nocopy  boolean  ,
229          x_msg_count      out  Nocopy  number  ,
230          x_msg_data       out  Nocopy  varchar2,
231          x_return_status  out  Nocopy  varchar2
232  );
233 
234 --begin bugfix 3075105
235 Procedure  check_rsv_exists
236  (
237          pLineId          in            number    ,
238          x_ResultStatus    out Nocopy   boolean  ,
239          x_msg_count     out   Nocopy   number  ,
240          x_msg_data       out  NoCopy   varchar2,
241          x_return_status out   NoCopy   varchar2
242  );
243 --end bugfix 3075105
244 
245 PROCEDURE rsv_before_booking_wf (
246         p_itemtype        in      VARCHAR2, /* item type */
247         p_itemkey         in      VARCHAR2, /* config line id   */
248         p_actid           in      number,   /* ID number of WF activity */
249         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
250         x_result      out NoCopy  VARCHAR2  /* result of activity    */
251         );
252 
253 
254 PROCEDURE Purchase_price_calc_wf(
255         p_itemtype        in      VARCHAR2, /* workflow item type */
256         p_itemkey         in      VARCHAR2, /* sales order line id */
257         p_actid           in      number,   /* ID number of WF activity */
258         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
259         x_result      out NoCopy  VARCHAR2  /* result of activity */
260 
261         );
262 
263 -- bugfix2327972
264 
265 PROCEDURE chk_rsv_after_afas_wf (
266         p_itemtype        in      VARCHAR2, /* item type */
267         p_itemkey         in      VARCHAR2, /* config line id   */
268         p_actid           in      NUMBER,   /* ID number of WF activity */
269         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
270         x_result      out NoCopy  VARCHAR2  /* result of activity    */
271         );
272 
273 --This will get called from a new node in create supply subprocess
274 --added fro DMF-J
275 --new node is : Check supply creation which befor create supply order
276 --block activity
277 --create by KKONADA
278 PROCEDURE check_supply_creation_wf(
279         p_itemtype   in           VARCHAR2, /*item type */
280         p_itemkey    in           VARCHAR2, /* config line id    */
281         p_actid      in           number,   /* ID number of WF activity  */
282         p_funcmode   in           VARCHAR2, /* execution mode of WF activity*/
283         x_result     out  NoCopy  VARCHAR2  /* result of activity    */
284         );
285 
286 procedure config_item_created_wf(
287         p_itemtype        in      VARCHAR2, /*w workflow item type */
288         p_itemkey         in      VARCHAR2, /* config line id */
289         p_actid           in      NUMBER,   /* ID number of WF activity */
290         p_funcmode        in      VARCHAR2, /* execution mode of WF activity */
291         x_result    out NoCopy    VARCHAR2  /* result of activity */
292         );
293 
294 end CTO_WORKFLOW;
295 
296 
297 
298 
299 
300