Automation script to modify WO created with createworkorder() - jython

Maximo automation script noob here. I'm trying to modify some values in a WO created with createworkorder(). I don't have any error in the logs, but the changes don't shows in the newly created WO. Can anyone help? Does my code make any sense? Thx.
Maximo 7.6.1 btw.
from java.util import Date
print "===================Print1 ==================="
woRemoteMbo = mbo.createWorkorder()
woset = woRemoteMbo.getThisMboSet()
print "===================Print2 ==================="
woRemoteMbo.setValue('WORKTYPE','ST')
woRemoteMbo.setValue('COMMODITY','')
woRemoteMbo.setValue('COMMODITY','EQ07031')
#woRemoteMbo.setValue('STATUS','ATTAPPRO')
woRemoteMbo.changeStatus('ATTAPPRO',Date(),'')
woRemoteMbo.setValue('WOPRIORITY','2')
woset.save()

Related

I created a updatesite.nsf from updatesite.ntf template and trying to import a feature

I created a updatesite.nsf from updatesite.ntf template and trying to import a feature and I get an error says "LS2J Error: Java constructor failed to execute in (#304)..." And a long message. Notes and Domino are 12.0.02 both 64 bit...Need help in this . Why am I getting this error ? Nothing in Activity logs either in the updatesite.nsf.
The developer tried to create a JAR and trying to import it the Feature into the updatesite,nsf database and it errors out as above. It should import as I am expecting.

Odoo error after installing xls report

I added xls engine and webkit addons. I am using Windows 2008 server. When I try to print ledger reports, it gives the following error:
Required report does not exist: account.account_report_general_ledger_xls
<type 'exceptions.Exception'>,Required report does not exist: account.account_report_general_ledger_xls,<traceback object at 0x1030CE40
Can any one guide me what im doing wrong? I did the same steps on another windows 7 server, its not giving me any error.
It seems that odoo can't find the report. Did you try an update all? Or take a look and try to find the report in database.

Automation Script in maximo

Please help me by providing a sample automation script (jython) for retrieving the data from database table using automation script which runs in maximo/tivoli 7.5
I'm new to get those details.
hopefully this helps ...
a example on how to load database information into maximo via rmi
https://www.ibm.com/developerworks/community/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/import_data_from_db_into_maximo_by_using_rmi_with_jython?lang=en
You can review the Automation Scripting examples on the IBM Wiki:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20Maximo%20Asset%20Management/page/Customizing%20with%20automation%20scripts
This code is getting data from table directly
from psdi.security import UserInfo
from psdi.server import MXServer
maximo = MXServer.getMXServer()
ui = maximo.getSystemUserInfo()
sessionSet = maximo.getMboSet("MAXSESSION", ui)
sessionSet.setWhere ("issystem = '1'")
s = sessionSet.getMbo(0)
servername = s.getString("SERVERNAME")
print servername

FileUploadDialogHandler()

I am trying to automate a web app which involves selecting an existing file using a fileuploaddialoghandler() method and entering the full path in the file name dropdown then Open click.
However, when I attempt this using this code
FileUploadDialogHandler fileupload = new FileUploadDialogHandler(#"C:\TIFFiles\Testtif.TIF");
//browser.WaitForComplete();
using (new UseDialogOnce(browser.DialogWatcher, fileupload))
{
newIee.Button(Find.ById("ctl00_WebPartManager1_FileUpload_FileBrowse")).ClickNoWait();
browser.AddDialogHandler(fileupload);
browser.WaitForComplete();
browser.RemoveDialogHandler(fileupload);
}
It does not work.
What else should I be doing?
Thanks much!
W
I just have one question about your code... What is newIee? I can't tell by looking at the code if newIee is attached to browser. Other than that, your FileUpdateDialogHandler should be fine.
If you can provide the code where you declare newIee, it might add me in determining if it's a factor causing your code not to work properly.

extra-paths not added to python path with zc.recipe.testrunner

I am trying to run tests by adding a version of tornado downloaded from github.com in the sys.path.
[tests]
recipe = zc.recipe.testrunner
extra-paths = ${buildout:directory}/parts/tornado/
defaults = ['--auto-color', '--auto-progress', '-v']
But when I run bin/tests I get the following error :
ImportError: No module named tornado
Am I not understanding how to use extra-paths ?
Martin
Have you tried looking into generated bin/tests script if it contains your path? It will tell definitely if your buildout.cfg is correct or not. Maybe problem is elsewhere. Because it seem that your code is ok.
If you happen to regularly include various branches from git/mercurial or elsewhere to buildout, you might be interested in mr.developer. mr.developer can download and add package to develop =. You wont need to set extra-path in every section.