Checkout this hidden Scripting with Maximo guide from IBM lead developers.
A very comprehensive list of examples is available here.
My colleague Mathias has also a very interesting blog on scripting.
Other articles and resources
- Launch report
- Automation scripting and email listener
- All scripting articles on Asset Management community
Do you know of additional resources which include complete or good list of methods that can be used in these Jython or Javascript scripts corresponding to the JAVA methods?
ReplyDeleteIt is hard for me to find a good reference for Jython or Javascript methods for Maximo.
Sorry I don't have any suggestion.
ReplyDeleteHi,
ReplyDeleteHow can I define conditional Scripts instead of expressions, which needs to be used in Conditional UI.
Thanks in Advance
Here's how I used a script to disable a toolbar icon in the SR application when a new SR is being entered and hasn't been saved yet...
DeleteCreate a script with a custom condition launch point. I named mine NOTTOBEADDED. I defined no variable bindings. I used the Jython script "evalresult = not onadd". I created a launch point named TKTNOTADD, and associated it with the TICKET object.
Create a new condition expression. A message shown during the automation script creation says that the expression must have exactly the same name as the script. I don't know if this is true. I've never tried creating an expression with a name that differs from its script. Set the expression type to CLASS. Set the class name to com.ibm.tivoli.maximo.script.ScriptCustomCondition. Set the expression field to name_of_your_script:name_of_your_launch_point. So in my case this was "NOTTOBEADDED:TKTNOTADD".
Add your condition to the grant of the toolbar icon's sig option in a security group. Or use the condition in a field's properties in the App Designer. Either way your script will be evaluated any time the condition expression is evaluated, and the value you assign to the evalresult variable will be the result of the conditional expression.
Looks like IBM moved/pulled the scripting doc (broken link) any idea where else I can find it.
ReplyDeleteIBM support got me the doc (got to love them ! ) but not sure if the PDF is available to the public so I will let Bruno republish the link.
DeleteThe original doc is hosted on developerWorks website that is under maitenance.
DeleteI have shared my copy here.
Hi Bruno, I have some security issues on browsers trying to enter into your shared copy. How can I get it?
DeleteThanks
Dear Bruno,
ReplyDeleteThank you very much for sharing the document on "Automation Scripts" with Maximo 7.5
Bruno -- what is the best way to compare (in Automation Scripts) the date entered in a field with the current date (Ie; Asset.datefield (DATE) not datetime -- compared with System Date --
ReplyDeleteIn oracle I would do something like where trunc(date) = trunc(sysdate) -- I have looked but have not found anything that looks like it will work for this situation...
Thanks,
Please use Maximo forum on developerWorks to ask for help.
DeleteRegards
Thanks Bruno,
ReplyDelete- ViKas
Unfortunately most examples in the doc. are in Jython (why do IBM selected Jython, instead of Rhino [i.e. JavaScript] is beyond me).
ReplyDeleteI do prefer to work in Rhino and have done so in most of my scripts, but had to investigate even simple things like "importing" packages in order to use standard MBOs/POJOs/EJBs in the scripts.
The engines that are supported in an
DeleteOOTB Maximo 75 are
1. Mozilla Rhino (JavaScript) which ships with the IBM/Oracle(Sun) JDK
2. Jython which is included as part of Maximo
Hi Everyone
ReplyDeleteI'm trying to use automation script on my custom object ( custom app ), but its look like the script doesn't executed in any launch point :(
is there anyone has been try this? I need enlightenment :(
Hi,
ReplyDeleteIs it possible to launch a script when a record is created via MIF?
for example when creating ticket through an MIF web service.
This comment has been removed by the author.
ReplyDeleteHi
ReplyDeleteHow can i mention security group name(CRM) in jython script?
Example: If user click the check box and save the records after save this check box should be read only except CRM user,
CRM group users can able to modify the check box after save the records also ...but other user not able to modify after save the records of checkbox
Guide me how can i do in jython script?
This comment has been removed by the author.
ReplyDeleteHi Sir,
ReplyDeleteI'm new in maximo development and I wonder if it is possible to execute a JavaScript code inside automation script? for example I want to get the value of an element and display it on a dialog box. Is it possible or not? Thanks!
Hi Bruno,
ReplyDeleteI am new to Maximo and Automation Scripting. Request your help in this doubt:
If we have suppose 5 record in MultiLocci table and on WO UI also and if a user deletes one record from the UI, then if we want to perform some action on that deletion, how can we know in Scripting that on this particular record, deletion has been performed.
Is there any kind of flag or something to identify that record ?
Thanks in advance. :)
Hi Hitesh:u can use flag mbo.toBeDeleted()
Delete