Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
129 ghuddy 4
'                  MAKE PENDING
119 ghuddy 5
'               --- PROCESS FORM ---
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
129 ghuddy 11
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 12
%>
13
 
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim parPv_id
29
Dim parRfile
30
Dim retERRmsg
31
Dim retALRTmsg
32
Dim retParameters
33
Dim pkgType
34
'------------ Constants Declaration -----------
35
'------------ Variable Init -------------------
36
parPv_id = Request("pv_id")
37
parRfile = Request("rfile")
38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
'----------------------------------------------
41
%>
42
<%
43
Sub MakePending ()
129 ghuddy 44
   Dim objWSH
45
   Set objWSH = Server.CreateObject("WScript.Shell")
121 hknight 46
 
129 ghuddy 47
   OraDatabase.Parameters.Add "PV_ID",    Request("pv_id"),        ORAPARM_INPUT, ORATYPE_NUMBER
48
   OraDatabase.Parameters.Add "RTAG_ID",  Request("rtag_id"),      ORAPARM_INPUT, ORATYPE_NUMBER
49
   OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
50
 
51
   objEH.TryORA ( OraSession )
52
   On Error Resume Next
53
 
54
   OraDatabase.ExecuteSQL " UPDATE package_versions "&_
55
                     " SET owner_id = :USER_ID"&_
56
                     " WHERE pv_id = :PV_ID"
57
 
58
   OraDatabase.ExecuteSQL _
59
   "BEGIN "&_
60
   " PK_ENVIRONMENT.MAKE_PENDING ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
61
   "END; "
62
 
63
   objEH.CatchORA ( OraSession )
64
 
65
   OraDatabase.Parameters.Remove "PV_ID"
66
   OraDatabase.Parameters.Remove "RTAG_ID"
67
   OraDatabase.Parameters.Remove "USER_ID"
68
 
69
   If objEH.LastOraFailed = FALSE Then
70
      objWSH.Run   "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:GetComponents //job:PostRun "&_
71
                  "/pv_id:"& Request("pv_id") , _
72
                  0, False
73
   End If
74
 
119 ghuddy 75
End Sub
76
%>
77
<%
78
'-----------------------  MAIN LINE  ---------------------------
79
 
80
'--- Process submition ---
81
If ( Request("rtag_id") <> "") AND (Request("pv_id") <> "") Then
129 ghuddy 82
 
83
   Call CheckRequirementsForMakePending ( parPv_id, parRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
84
 
85
   If IsNull(retERRmsg) Then
86
      ' All Requirements OK
87
      'COMPLETE THE REQUEST...
88
      Call MakePending ( )
89
 
90
      If Request("rfile") <> "" Then
91
         Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
92
      Else
93
         Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
94
      End If
95
 
96
   Else
97
      Call RaiseMsg ( Eval(retERRmsg), parRtag_id &"|"& parPv_id    &"|"& retParameters &"|"& "N" )
98
 
99
   End If
100
 
119 ghuddy 101
Else
129 ghuddy 102
   Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
103
   Response.write QSTR_All
119 ghuddy 104
End If
105
%>
106
 
107
<!-- DESTRUCTOR ------->
129 ghuddy 108
<!--#include file="common/destructor.asp"-->