Scope: Create a Concurrent program to bounce Mobile Warehouse Applications (MWA)
Shell Program for MWA Bounce on the Server
First, create a shell script on the Application server.
#!/bin/bash
# mwa_bounce.sh 03/29/2016 RG
echo “Following are System Parameters”
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
p0=$0
p1=$1
p2=$2
p3=$3
p4=$4
echo “1st System Parameter :”$p0
#echo “2nd System Parameter :”$p1
echo “3rd System Parameter :”$p2
echo “4th System Parameter :”$p3
echo “5th System Parameter :”$p4
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “Following are User Parameters “
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
#u1=$5
#echo “1st User Parameter :”$u1
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “Stopping MWA Server via “$p0
echo
nohup $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh stop $p1
echo $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh stop APPS
mail -s “Concurrent Request “$p4” Submitted to Bounce MWA by “$p3 ramesh.ganesan@mycompany.com< /dev/null
sleep 30
# Kill MWADIS
for pids in `ps -fu appldev|grep MWADIS|grep -v “grep”|awk ‘{print $2}’`
do
echo “forcing kill on MWADIS PID ${pids}”
kill -9 ${pids}
done
# Kill telnet
for pids in `ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $2}’`
do
#DTL=`ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $15}’` # 11i
DTL=`ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $17}’` # R12.2
echo “forcing kill on PID ${pids} for ${DTL}”
kill -9 ${pids}
done
sleep 30
echo “Starting MWA Server via “$p0
echo $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh start APPS
echo
rm -rf /tmp/mwa_alert.txt
touch /tmp/mwa_alert.txt
nohup $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh start $p1 |tee /tmp/mwa_alert.txt
# if the dispatcher isn’t free, email me
MWAERROR=`cat /tmp/mwa_alert.txt | grep “is not free to start the dispatcher”`
if [ ! -z “$MWAERROR” ]
then
echo $MWAERROR | mail -s “MWA Error” ramesh.ganesan@brakepartsinc.com
fi
Copy the program to $CUSTOM_TOP/bin and create Soft link
cd $XXBPI_TOP/bin
[appldev@uswodapp013 bin]$ ln -s /ua4001/appl/fnd/12.0.0/bin/fndcpesr mwa_bounce
Create Concurrent Program Executable
As SYSADMIN, define the Executable via Concurrent->Program->Executable
Create Concurrent Program Definition
sysadmin, define the Executable via Concurrent->Program->Define
Assign a Request Group
Security->Responsibility->Request
Submit the Request and view Log file and verify Email
Log file
Email output
Program Definition and Request Group can be downloaded and uploaded to other EBS instances with MWA
Program Definition Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxbpi_mwa_bounce_prgm.ldt PROGRAM APPLICATION_SHORT_NAME=”XXBPI_MWA_BOUNCE” CONCURRENT_PROGRAM_NAME=”XXBPI_MWA_BOUNCE”
Upload
FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct xxbpi_mwa_bounce_prgm.ldt
Request Group Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct xxbpi_system_admin_reports_reqgrp.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”System Administrator Reports” APPLICATION_SHORT_NAME=”FND”
Upload