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

Michel started his career as a medical officer in the Royal Dutch Airforce, with a focus on pharma. After the air force, he continued in pharma, followed by time working in clinical pharmacology. While there, he transitioned to IT by learning UNIX and MUMPS, and developed a system for managing patients’ medical records. As his career developed, his responsibility shifted from a deep technical perspective to a more visionary role. At the end of 2011, Michel authored a book on WebLogic Administration for beginners. He joined Qualogy in April 2012 where he expanded his repertoire significantly, serving a wide range of customers with his knowledge about Java Application Servers, Middleware and Application Integration. He also increased his multiple-industry knowledge in his role as Solutions or IT architect by working for customers in a range of sectors, including financials, telecom, public transportation and government organizations. In 2012, he received the IT Industry-recognized title of Oracle ACE for being an ambassador and community leader in his area of expertise. In 2019, this was enhanced to Oracle ACE Director. Michel is asked regularly to speak about technology and the impact of innovation at national and international conferences such as KubeCon, Oracle OpenWorld, Groundbreakers Developers Tours and others. He contributes actively to the OpenSource community and solutions regarding containerization, CI/CD and DevOps. In October 2021, Michel took an exciting step in his career by becoming Business Unit Manager for Qualogy Managed Services. While he still has a finger on the pulse in terms of technology, he is expanding his scope by combining his experience with the new insights gained in his new position. Read more via blog: https://bit.ly/3fAxrqf | Medium: https://mschildmeijer.medium.com/ | Books: Oracle Weblogic Server 11gR1 PS2: Administration Essentials: https://bit.ly/3IhALmf | Oracle WebLogic Server 12c: First Look1: https://bit.ly/31olbpj

More posts by Michel Schildmeijer
Comments
Reply