Groovy script getEpmAutomate issue
Summary:
I am trying to run EPM Automate Using Server-Side Groovy.
Content (please ensure you mask any confidential information):
My script is as follows:
EpmAutomate AM = getEpmAutomate()
EpmAutomateStatus loginStatus = AM.execute("login", username, password, url) ?: null
loginStatus.getStatus() == 0 ?: throwVetoException("Login failed: ${loginStatus.getOutput() ?: 'Unknown error occurred during login'}")
println("EPM Automate instance initialized successfully.")
EpmAutomateStatus exportStatus = AM.execute("exportJobConsole", "JobConsoleRecords_2024.zip", "nDays=1", "jobTypes=Rules", "JobStatusCodes=1")
exportStatus.getStatus() == 0 ?: throwVetoException("Export failed: ${exportStatus.getOutput() ?: 'Unknown Error'}")
println("Export job completed successfully.")
With my admin account, I can run this script. But with normal user account, it shows insufficient right.
I would like to ask whether there is workaround for this.