This discussion is archived
1 Reply Latest reply: Feb 10, 2014 1:30 AM by RenévanWijk RSS

Need Help regarding wlst script

f1b0fb12-201e-46fa-b2f7-250f21ea45f8 Newbie
Currently Being Moderated

Hi

 

I am new to wlst scripting, I need to know how to add error handling in below script and how to unlock the invoke in case of error.

below is the script

 

connect(userConfigFile=str(gConfigFile), userKeyFile=str(gKeyFile), url=str(gAdminHost) + ':' + str(gAdminPort));

print 'Connecting to Domain ...'

domainCustom()

cd ('oracle.biee.admin')

print 'Connecting to BIDomain MBean ...'

cd ('oracle.biee.admin:type=BIDomain,group=Service')

objs = jarray.array([], java.lang.Object)

strs = jarray.array([], java.lang.String)

invoke('lock', objs, strs)

 

cd ('..')

cd ('oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication,group=Service')

 

objs=jarray.array([newRPDlocation,newRPDpassword],Object)

strs=jarray.array(['java.lang.String', 'java.lang.String'],String)

invoke('uploadRepository', objs, strs)

 

cd ('..')

cd ('oracle.biee.admin:type=BIDomain,group=Service')

objs = jarray.array([], java.lang.Object)

strs = jarray.array([], java.lang.String)

invoke('commit', objs, strs)

 

disconnect()

exit()

 

Thanks

Samit Baghla

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points