Remote IT Support!! Please contact us

For Any Remote Support,Implementation/Upgrade Projects,Queries,Collaborations please mail us at support@funoracleapps.com

Shell Script to Update Workflow Configuration in Oracle Apps

No comments

Shell Script to Update Workflow Configuration in Oracle Apps






I am going to share my script which I use to updating workflow configuration from the server using bash script.

Note: Workflow password still has to be updated from the front end and it is store in encrypted form and cannot be updated from the backend.

Please use only after testing in your environment and modify based on your requirement.


I have created a Config file and a driver file.

Config will have details of new workflow configuration values and driver fill take action based on the config file.

Config File:

cat config_file

from,10065,Workflow Mailer (DEV121 - Development)
inbound_server_name,10069,imap.ebs122.lab
outbound_server_name,10079,smtp.ebs122.lab
outbound_user,10307,WorkflowDEV121@ebs122.lab
reply_to_address,10089,WorkflowDEV121@ebs122.lab
inbound_username,10054,WorkflowDEV121@ebs122.lab


Driver file:

cat wf_up_driver.sh

. ~/.bash_profile
Curr_log=/tmp/$TWO_TASK
TMP_UPD=/tmp/wf_up_${TWO_TASK}.sql
cat /dev/null > ${Curr_log}
wf_config_file=$1
APPSLOGIN=apps/apps
wf_val_check()
{

echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "$1"
for i in `awk -F ',' '{print $2}' ${wf_config_file}`
do
sqlplus -s $APPSLOGIN <<EOF
set head off
set feedback off
set verify off;
SELECT
    'You have selected parameter : '
     || c.display_name
     || wf_core.newline
     || 'Current value of parameter  : '
     || a.parameter_value
FROM
    fnd_svc_comp_param_vals a,
    fnd_svc_comp_params_tl c
WHERE
        c.parameter_id = a.parameter_id
    AND
        a.component_parameter_id = to_number(nvl(
            '${i}',
            '0'
        ) )
    AND
        c.language = 'US';
exit;
EOF
done
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
}

wf_upd_val()
{
echo "updating values"
while read line; 
do 
new_val="`echo $line|awk -F ',' '{print $3}' `"
par_id="`echo $line|awk -F ',' '{print $2}'`"
echo "UPDATE fnd_svc_comp_param_vals
SET    parameter_value = nvl('"$new_val"', parameter_value)
WHERE  component_parameter_id = to_number(nvl('"$par_id"', '0'));"
done < ${wf_config_file} > ${TMP_UPD}

sqlplus -s $APPSLOGIN <<EOF
set head off
set feedback off
set verify off;
@${TMP_UPD}
commit;
exit;
EOF
}

wf_val_check old
wf_upd_val
wf_val_check new


Usage:

driverfile_name <config_file_name>


If you like please follow and comment

No comments :

Post a Comment