To stop the WebLogic domain with WebLogic Scripting:
- Browse to
<P6_EPPM_Home>\scripts
and then create a text file called stop_primavera.py.Note: <P6_EPPM_Home> is the P6 home directory that was set during installation.
- Edit stop_primavera.py and then add the following lines:
print('Stopping Primavera servers. This will not stop the Node Manager because it may be needed for other servers.')
scripts_dir='<P6_EPPM_Home>/scripts'
adminserver_host='<Admin_Server_Hostname>'
adminserver_port='<Admin_Server_Port>'
<Managed_Server_Variable>='<Managed_Server_Name>'
# Create a variable, similar to the one above, for each managed server in the P6 EPPM domain.
connect(userConfigFile=scripts_dir+'/primaveraConfig.secure',userKeyFile=scripts_dir+'/primaveraKeyfile.secure',url='t3://'+adminserver_host+':'+adminserver_port)
# The following section of the script tries to shutdown a managed server. Copy and modify this section of the script for each managed server in the P6 EPPM domain.
try:
print('PRM-Shutting down the managed server for <Managed_Server_Variable>')
shutdown(<Managed_Server_Variable>,'Server','true',100,'true')
except:
print('PRM-Failed to stop managed server: ' + <Managed_Server_Variable>)
# The following section of the script tries to shutdown the administration server.
try:
print('PRM-Shutting down <Admin_Server_Name>.')
shutdown('<Admin_Server_Name>','Server','true',100,'true')
except:
print('PRM-Failed to stop <Admin_Server_Name>.')
print('PRM-Shutdown Complete')
exit()
Notes:
- <P6_EPPM_Home> is the P6 EPPM home directory that was set during installation.
- <Admin_Server_Hostname> is the name of the host where the administration server was installed.
- <Admin_Server_Port> is the port number of administration server. The default is 7001.
- <Managed_Server_Variable> is the variable that you created for a P6 EPPM application.
- <Managed_Server_Name> is the logical name of the managed server. The default managed server names for P6 EPPM are P6, P6IntegrationAPI, p6procloudconnect, P6WebServices, and TeamMember.
- <Admin_Server_Name> is the logical name of the administration server. The default is AdminServer.
- Save and close the file.
- Browse to
<P6_EPPM_Home>\scripts
and then create a text file called stop_primavera.sh. - Edit stop_primavera.sh and then add the following lines:
export CLASSPATH=
<WebLogic_Home>/wlserver/server/bin/setWLSEnv.sh <Java_Home>/bin/java weblogic.WLST <P6_EPPM_Home>/scripts/stop_primavera.py
Notes:
- <WebLogic_Home> is the WebLogic home directory. The default is Oracle/Middleware/Oracle_Home.
- <Java_Home> is the path to the JDK that is used by WebLogic.
- <P6_EPPM_Home> is the P6 EPPM home directory that was set during installation..
- Save and close the file.