Read Maximo system properties in a Jython script
It is a good practise to store all properties like usernames, passwords, Url’s, etc in the Maximo System Properties. User defined properties can be defined in addition to all the tons of existing system properties. You will find the properties application under
System Configuration –> Plattform Configuration –> System Properties
To define a new property just click “New Row” in the Global Properties section:
The usage of these properties in a Jython script is quit easy. To read and print the new “custom.username” property the following script can be used:
from psdi.server import MXServer configData = MXServer.getMXServer().getSystemProperties() maxProperty = configData.getProperty("custom.username") print maxProperty
When tested in the Maximo Script editor the script should print out the username “bigadmin”. If you get a no output at StdOut or “None” you should verify if you made a live refresh of the property data.