WLST change script to SOA Common, BPEL and BPMN Properties

WLST change script to SOA Common, BPEL and BPMN Properties

Published on: Category: Oracle

To all you WebLogic / SOA Suite Admins: getting tired and bored to postconfiguration actions of SOA Suite specific settings after the 5th  SOA /BPM Somain you’ve created? I did :). Doing manual repetitive tasks can be boring, but also time consuming and sensible for error.

I had to tune  some performance related items in the SOA /BPM  stack, called Dispatcher Thread Settings. These threads are used for process flows, and the more threads you define the more threads can be handled simultaneously. An example of which properties I mean can be seen in the picture below, set in the Fusion Middleware Control, under soa-infra–> SOA Administration. There you can find the common, BPEL and BPMN properties to set, all representing an accessible mbean.

The set of scripts contain 3 components. The scripts are  based on the ones I found at Tootutor Blog

  • substitute.py -> Used for parsing and substitute the current vallues with the one of the property file
  • soaCommProp.py –> The actual executable python script
  • properties –> the property file loaded with the substitute.py

To run the script and change the settings, first run the setDomainEnv.sh to set some parameters, or use a wlst shell script from the oracle_common/common/bin directory.

Then run:

  1. java weblogic.WLST soaCommProp.py

I’ve added a python color class to highlight the changes that have been made.

Here a snippet of the code:

  1. def __changeBPELProperties(properties):
  2. soaconfigmbean=getKeyValue('SOA_CONFIG', properties)
  3. locationinfo=getKeyValue('MANAGED_SERVER_INFO', properties)
  4. appname=getKeyValue('APP_NAME', properties)
  5. bpelname=getKeyValue('bpname', properties)
  6. DEPT=getKeyValue('BPDEP', properties)
  7. DIVTS=getKeyValue('BPDIVT',properties)
  8. DISTS=getKeyValue('BPDIST', properties)
  9. DEPTV=getKeyValue('BPDEP_VALUE', properties)
  10. DIVTSV=getKeyValue('BPDIVTS_VALUE', properties)
  11. DISTSV=getKeyValue('BPDIST_VALUE', properties)
  12. BPELMBeanobj = ObjectName(soaconfigmbean+':Location='+locationinfo+',name='+bpelname+',type=BPELConfig,Application='+appname)
  13. mbs.setAttribute(BPELMBeanobj, Attribute(DEPT,int(DEPTV)))
  14. mbs.setAttribute(BPELMBeanobj, Attribute(DIVTS,int(DIVTSV)))
  15. mbs.setAttribute(BPELMBeanobj, Attribute(DISTS,int(DISTSV)))
  16. print bcolors.OKGREEN + 'New' + ' ' + bpelname + ' ' + 'settings:' + bcolors.ENDC
  17. print 'Current' + DEPT +' ' +'Value is set to ----> ', mbs.getAttribute(BPELMBeanobj,DEPT)
  18. print 'Current' + DIVTS +' ' +'Value is set to ----> ', mbs.getAttribute(BPELMBeanobj,DIVTS)
  19. print 'Current' + DISTS +' ' +'Value is set to ----> ', mbs.getAttribute(BPELMBeanobj,DISTS)

Hope this will help you forward in your work.  It sure helped me!

Special thanks to Togotutor Blog

All the best for 2013!

Publicatiedatum: 28 december 2012

Michel Schildmeijer
About the author Michel Schildmeijer

Having made his start in the pharmacy sector, Michel transitioned to IT in 1996, working on a UNIX TTY terminal-based system and the MUMPS language. He currently works as a solutions architect at Qualogy, with a focus on middleware, application integration and service-oriented architecture. His passion for middleware started in 2000 when working as a support analyst for a financial institute with BEA WebLogic and Tuxedo. Michel is an expert on the WebLogic platform. He serves customers in his role as architect and advises them in all aspects of their IT landscape. He became an Oracle ACE in 2012 and wrote two books about WebLogic: Oracle WebLogic Server 11gR1 PS2: Administration Essentials and Oracle WebLogic Server 12c: First Look. He is a well-known speaker at national and international conferences and is recognised as an official Oracle Speaker. Read his blog: https://community.oracle.com/blogs/mnemonic

More posts by Michel Schildmeijer