Chris,
Good questions. IBM could do a lot to improve the script development process.
Some tricks that I've learned over the years, particularly for hosted environments:
- Use Error messages in the UI to troubleshoot values or script logic. This can help you quickly diagnose where the problem code resides in a large script.
- Run Scripts manually for test/development purposes. I find this more straightforward than the Test functionality personally, but that could be due to my own limitations with the test capabilities. (You'll need to add the EXECUTE sigopt in Application Designer and then grant the permission in Security Groups).
- Have a utility script to read log files via Script. Something like this will let you read log files from the remote server directly in the Autoscript window.
Sample Log File script:
from psdi.server import MXServer
from java.io import File
from java.io import FileReader
from java.io import BufferedReader
logFile = 'logs\\MXServer_maximo.log'
server = MXServer.getMXServer()
logFolder = server.getProperty("mxe.logging.rootfolder")
filePath = logFolder.replace("\\","\\\\").rstrip("\\") + "\\\\.."
if logFile is not None:
filePath = filePath + "\\" + logFile
input = FileReader(filePath);
buffer = BufferedReader(input);
try:
line = buffer.readLine()
while line is not None:
print(line)
line = buffer.readLine()
finally:
buffer.close();
------------------------------
Tim Ferrill
Solutions Consultant
Intelligent Technology Solutions
tferrill@webuildits.comwww.webuildits.com@tferrill/@webuildits
------------------------------