2

I would like to know how to fetch system property in an automation script. I do understand we can declare it as variable however I would like to know whether there is any other way since using it as a variable is causing error in scripting for integration.

max092012
  • 365
  • 1
  • 5
  • 25

1 Answers1

3

MXServer has 2 getProperty() methods. To get a public property's value, just pass in the name of the property. To get a private property's value, you'll also need to pass in a UserInfo.

Example in Jython:

from psdi.server import MXServer
maximo = MXServer.getMXServer()
publicProperty = maximo.getProperty("company.public.propertyname")
privateProperty = maximo.getProperty("company.private.propertyname",mbo.getUserInfo())
Preacher
  • 2,127
  • 1
  • 11
  • 25