DBA Data[Home] [Help]

PACKAGE: APPS.CTO_WIP_WORKFLOW_API_PK

Source


1 PACKAGE CTO_WIP_WORKFLOW_API_PK AUTHID CURRENT_USER as
2 /* $Header: CTOWIPAS.pls 120.1 2005/06/02 13:46:58 appldev  $ */
3 /*============================================================================+
4 |  Copyright (c) 1993 Oracle Corporation    Belmont, California, USA          |
5 |                        All rights reserved.                                 |
6 |                        Oracle Manufacturing                                 |
7 +=============================================================================+
8 |                                                                             |
9 | FILE NAME   : CTOWIPAS.pls                                                  |
10 |                                                                             |
11 | DESCRIPTION:                                                                |
12 |               Three APIs are written for WIP support for OE-99 from         |
13 |               the CTO group.                                                |
14 |               first_reservation_created - inform the order line workflow    |
15 |               thaT the first reservation has been created for this sales    |
16 |               order line.                                                   |
17 |               last_reservation_deleted - inform the order line workflow that|
18 |               the last reservation has been deleted for this sales order    |
19 |               line.                                                         |
20 |               workflow_build_status - to determine if a particular          |
21 |               sales order line is at the released phase of the workflow.    |
22 |                                                                             |
23 |                                                                             |
24 | HISTORY     :                                                               |
25 |               July 22, 99  James Chiu   Initial version                     |
26 |               12/18/2000   Added by Renga two pkg variables                 |
27 |                            are added to generate CTO debug messages         |
28 |                            One CTO_DEBUG Utility procedure is added         |
29 |               06/01/2005   Renga Kannan
30 |                            Added NoCopy Hint
31 =============================================================================*/
32 
33 /**************************************************************************
34 
35    Procedure:   first_wo_reservation_created
36    Parameters:	order_line_id		- order_line_id
37 		x_return_status		- standard API output parameter
38 		x_msg_count		-           "
39 		x_msg_data		- 	    "
40    Description: This callback is used to inform the order line workflow that
41 		the first reservation has been created for this sales order
42 		line.
43 
44 *****************************************************************************/
45 
46 PROCEDURE first_wo_reservation_created(
47 	order_line_id	IN		NUMBER,
48 	x_return_status	OUT  NOCOPY	VARCHAR2,
49 	x_msg_count	OUT  NOCOPY	NUMBER,
50 	x_msg_data	OUT  NOCOPY	VARCHAR2
51 	);
52 
53 
54 /**************************************************************************
55 
56    Procedure: 	last_wo_reservation_deleted
57    Parameters:  order_line_id           - order_line_id
58                 x_return_status         - standard API output parameter
59                 x_msg_count             -           "
60                 x_msg_data              -           "
61    Description: This callback is used to inform the order line workflow that
62                 the last reservation has been deleted for this sales order
63                 line.
64 
65 *****************************************************************************/
66 
67 PROCEDURE last_wo_reservation_deleted(
68 	order_line_id   IN             NUMBER,
69         x_return_status OUT  NOCOPY    VARCHAR2,
70         x_msg_count     OUT  NOCOPY    NUMBER,
71         x_msg_data      OUT  NOCOPY    VARCHAR2
72         );
73 
74 
75 /**************************************************************************
76 
77    Procedure:   flow_creation
78    Parameters:	order_line_id		- order_line_id
79 		x_return_status		- standard API output parameter
80 		x_msg_count		-           "
81 		x_msg_data		- 	    "
82    Description: This callback is used to inform the order line workflow that
83 		the first flow schedule has been created for this sales order
84 		line.
85 
86 *****************************************************************************/
87 
88 PROCEDURE flow_creation(
89 	order_line_id	IN	   NUMBER,
90 	x_return_status	OUT NOCOPY VARCHAR2,
91 	x_msg_count	OUT NOCOPY NUMBER,
92 	x_msg_data	OUT NOCOPY VARCHAR2
93 	);
94 
95 
96 /**************************************************************************
97 
98    Procedure:   flow_deletion
99    Parameters:  order_line_id           - order_line_id
100                 x_return_status         - standard API output parameter
101                 x_msg_count             -           "
102                 x_msg_data              -           "
103    Description: This callback is used to inform the order line workflow that
104                 the last flow schedule has been deleted for this sales order
105                 line.
106 
107 *****************************************************************************/
108 
109 PROCEDURE flow_deletion(
110 	order_line_id   IN         NUMBER,
111         x_return_status OUT NOCOPY VARCHAR2,
112         x_msg_count     OUT NOCOPY NUMBER,
113         x_msg_data      OUT NOCOPY VARCHAR2
114         );
115 
116 /**************************************************************************
117 
118    Procedure:   query_wf_activity_status
119    Parameters:  p_itemtype                -
120                 p_itemkey                 -
121                 p_activity_label          -           "
122                 p_activity_name           -           "
123                 p_activity_status         -
124    Description: this procedure is used to query a Workflow activity status
125 
126 *****************************************************************************/
127 
128 PROCEDURE query_wf_activity_status(
129         p_itemtype        IN         VARCHAR2,
130         p_itemkey         IN         VARCHAR2,
131         p_activity_label  IN         VARCHAR2,
132         p_activity_name   IN         VARCHAR2,
133         p_activity_status OUT NOCOPY VARCHAR2
134         );
135 
136 
137 
138 /**************************************************************************
139 
140    Function:   	workflow_build_status
141    Parameters:  order_line_id           - order_line_id
142    Description: to determine if a particular          |
143                 sales order line is at the released phase of the workflow.
144 		This function returns TRUE/FALSE.
145 
146 *****************************************************************************/
147 
148 FUNCTION workflow_build_status(
149 	order_line_id	IN 	NUMBER)
150 return INTEGER;
151 
152 PRAGMA RESTRICT_REFERENCES (query_wf_activity_status, WNDS);
153 PRAGMA RESTRICT_REFERENCES (workflow_build_status, WNDS);
154 
155 -- Added by Renga Kannan on 12/18/2000 added two package varibales which is used by CTO_DEBUG procedure
156 
157 File_dir         varchar2(200);
158 File_name        varchar2(200);
159 
160 -- bugfix 2430063 : added global variable to check for debug level
161 gDebugLevel	 number :=  to_number(nvl(FND_PROFILE.value('ONT_DEBUG_LEVEL'),0));
162 
163 
164 /******************************************************************************
165 
166        Procedure  : CTO_DEBUG
167        Parameters : proc_name      ---   Name of the procedure which is calling this utility
168                     Text           ---   Debug message which needs to be written to the log file
169 
170 
171        Description :   This utility will write the message into the CTO Debug file
172 
173 
174 *********************************************************************************/
175 
176 PROCEDURE   CTO_DEBUG(
177                         proc_name   IN   VARCHAR2,
178                         text        IN   VARCHAR2);
179 
180 
181 END CTO_WIP_WORKFLOW_API_PK;