Subversion Repositories DevTools

Rev

Rev 5384 | Rev 5590 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|                   wAddProc                        |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_general.asp"-->
23
<!--#include file="_access_control_login.asp"-->
24
<%
25
'------------ VARIABLE DEFINITION -------------
26
Dim rsQry, healthTag, cmdInterface, pkgOwner, isInterface, package, procDesc
27
Dim sMessage
28
Dim SEQ_proc_id
29
'------------ CONSTANTS DECLARATION -----------
30
'------------ VARIABLE INIT -------------------
31
sMessage = NULL
32
isInterface = NULL
33
Set objFormCollector = CreateObject("Scripting.Dictionary")
34
'------------ CONDITIONS ----------------------
35
'----------------------------------------------
36
%>
37
<%
38
 
39
%>
40
<%
41
'------------ RUN BEFORE PAGE RENDER ----------
42
 
43
 
44
If CBool(Request("action")) Then
45
 
46
   Dim Query_String
47
 
48
   If Request("isInterface") = "" Then
49
      isInterface = "F"
50
   Else
51
      isInterface = "T"
52
   End If
53
 
54
   Query_String = _
55
   "   SELECT * FROM PROCESSES WHERE PROC_NAME = '"& Request("healthTag") &"'"&_
56
   "   AND RUN_AS = '"& Request("cmdInterface") &"' AND PKG_OWNER = '"& Request("pkgOwner") &"'"&_
57
   "   AND IS_INTERFACE = '"& isInterface &"'"
58
 
59
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
60
 
61
   If rsTemp.RecordCount = 0 Then
62
 
63
      SEQ_proc_id = Get_From_DUAL("DEPLOYMENT_MANAGER.SEQ_PROC_ID.nextval")
64
 
65
      OraDatabase.Parameters.Add "PROC_ID",         SEQ_proc_id,              ORAPARM_INPUT, ORATYPE_NUMBER
66
      OraDatabase.Parameters.Add "PKG_HEALTH_TAG",  Request("healthTag"),     ORAPARM_INPUT, ORATYPE_VARCHAR2
67
      OraDatabase.Parameters.Add "PROC_DESC",       Request("procDesc"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
68
      OraDatabase.Parameters.Add "CMD_INTERFACE",   Request("cmdInterface"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
69
      OraDatabase.Parameters.Add "PKG_OWNER",       Request("pkgOwner"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
70
      OraDatabase.Parameters.Add "IS_INTERFACE",    isInterface,              ORAPARM_INPUT, ORATYPE_VARCHAR
71
      OraDatabase.Parameters.Add "PV_ID",           Request("pv_id"),         ORAPARM_INPUT, ORATYPE_NUMBER
72
      OraDatabase.Parameters.Add "USER_ID",         objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER
73
 
74
      objEH.TryORA ( OraSession )
75
      On Error Resume Next
76
 
77
      OraDatabase.ExecuteSQL _
78
      "BEGIN  PK_PACKAGE.ADD_PROCESS( :PROC_ID, :PKG_HEALTH_TAG, :PROC_DESC, :CMD_INTERFACE, :PKG_OWNER, :IS_INTERFACE, :PV_ID, :USER_ID);  END;"
79
 
80
      objEH.CatchORA ( OraSession )
81
 
82
      OraDatabase.Parameters.Remove "PROC_ID"
83
      OraDatabase.Parameters.Remove "PKG_HEALTH_TAG"
84
      OraDatabase.Parameters.Remove "PROC_DESC"
85
      OraDatabase.Parameters.Remove "CMD_INTERFACE"
86
      OraDatabase.Parameters.Remove "PKG_OWNER"
87
      OraDatabase.Parameters.Remove "IS_INTERFACE"
88
      OraDatabase.Parameters.Remove "PV_ID"
89
      OraDatabase.Parameters.Remove "USER_ID"
90
 
91
      If objEH.Finally Then
92
         Call OpenInParentWindow ("process_dependencies.asp?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id"))
93
         Call CloseWindow()
94
      End If
95
 
96
   Else
97
      Call RaiseMsg ( enum_MSG_PROCESS_EXISTS, Request("pv_id") )
98
   End If
99
 
100
   rsTemp.Close
101
   Set rsTemp = nothing
102
 
103
End If
104
 
105
 
106
'----------------------------------------------
107
%>
108
<html>
109
<head>
110
<title>Release Manager</title>
111
<link rel="shortcut icon" href="<%=FavIcon%>"/>
112
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
113
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
114
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
115
<script language="JavaScript" src="scripts/common.js"></script>
116
</head>
117
 
118
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormSearch.prod_name.focus();">
119
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
120
   <tr>
121
      <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Add Process</span> <br>
122
         Add a process for the package version.
123
      </td>
124
   </tr>
125
   <%
126
   '-- FROM START ---------------------------------------------------------------------------------------------------------------
127
   objFormComponent.FormName = "FormSearch"
128
   objFormComponent.Action = "wAddProcessBySearch.asp"
129
   Call objFormComponent.FormStart()
130
   %>
131
   <tr>
132
      <td background="images/bg_quicksearch.gif" class="body_txt">
133
         <table width="100" border="0" cellspacing="3" cellpadding="0">
134
            <tr>
135
               <td nowrap class="body_txtw"><strong>Process Search</strong> </td>
136
               <td><input name="prod_name" type="text" class="body_txt" size="20"></td>
137
               <td><input name="btn" type="image" src="icons/b_search.gif" width="16" height="16" border="0"></td>
138
            </tr>
139
         </table>
140
      </td>
141
   </tr>
142
   <%=objPMod.ComposeHiddenTags()%>
143
   <%
144
   Call objFormComponent.FormEnd()
145
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
146
   %>
147
 
148
   <%
149
   '-- FROM START --------------------------------------------------------------------------------------------------------------
150
   objFormComponent.FormName = "FormName"
151
   objFormComponent.Action = ScriptName
152
   objFormComponent.OnSubmit = "ShowProgress();"
153
   Call objFormComponent.FormStart()
154
 
155
   %>
156
   <tr>
157
      <td background="images/bg_login.gif">
158
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
159
            <tr>
160
               <td><%=ProgressBar()%></td>
161
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Submit">
162
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
163
               </td>
164
            </tr>
165
         </table>
166
      </td>
167
   </tr>
168
   <tr>
169
      <td>
170
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
171
         <%Call Messenger ( sMessage , 3, "100%" )%>
172
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
173
         <!--#include file="messages/_msg_inline.asp"-->
174
         <table width="664" border="0">
175
            <tr>
176
               <td><span class="body_txt">Package Health Tag</span>&nbsp;</td>
177
               <td><input name="healthTag" type="text" class="body_txt" value="<%=healthTag%>">&nbsp;</td>
178
            </tr>
179
            <tr>
180
               <td><span class="body_txt">Process Description</span></td>
181
               <td><textarea name="procDesc" rows=3 cols=50 class="body_txt"><%=procDesc%></textarea></td>
182
            </tr>
183
            <tr>
184
               <td><span class="body_txt">Package/Product</span></td>
185
               <td>
186
                  <%
187
                  Dim rsTemp
188
 
189
                  Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT * FROM PACKAGE_VERSIONS PV, PACKAGES PKG WHERE PV.PKG_ID = PKG.PKG_ID AND PV.PV_ID ="& Request("pv_id") &"", cint(0))
190
                  Response.Write("<input name=""pkg_version"" type=""text"" class=""body_txt"" value="& rsTemp("pkg_name") &" size=70 disabled>")
191
                  rsTemp.Close
192
                  Set rsTemp = nothing
193
                  %>
194
               </td>
195
            </tr>
196
            <tr>
197
               <td><span class="body_txt">Command Interface</span></td>
198
               <td><input name="cmdInterface" type="text" class="body_txt" value="<%=cmdInterface%>" size=80></td>
199
            </tr>
200
            <tr>
201
               <td><span class="body_txt">Is Interface</span></td>
202
               <td><input type="checkbox" name="isInterface">
203
                  <span class="body_txt">(Checked If True)</span>
204
               </td>
205
            </tr>
206
            <tr>
207
               <td><span class="body_txt">Package Owner</span></td>
208
               <td><input name="pkgOwner" type="text" class="body_txt" value="<%=pkgOwner%>"></td>
209
            </tr>
210
            <tr>
211
               <td>&nbsp;</td>
212
               <td>&nbsp;</td>
213
            </tr>
214
         </table>
215
      </td>
216
   </tr>
217
   <%=objPMod.ComposeHiddenTags()%>
218
   <input type="hidden" name="action" value="true">
219
   <%
220
   Call objFormComponent.FormEnd()
221
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
222
   %>
223
</table>
224
</body>
225
</html>
226
<%
227
'------------ RUN AFTER PAGE RENDER -----------
228
Set objFormCollector = Nothing
229
'----------------------------------------------
230
Call Destroy_All_Objects
231
%>