Subversion Repositories DevTools

Rev

Rev 121 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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