Pages

April 27, 2012

Maximo 7.5 scripting guide

Scripting is a powerful new feature that was introduced in Maximo 7.5.
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


22 comments:

  1. 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?

    It is hard for me to find a good reference for Jython or Javascript methods for Maximo.

    ReplyDelete
  2. Sorry I don't have any suggestion.

    ReplyDelete
  3. Hi,

    How can I define conditional Scripts instead of expressions, which needs to be used in Conditional UI.

    Thanks in Advance

    ReplyDelete
    Replies
    1. 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...

      Create 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.

      Delete
  4. Looks like IBM moved/pulled the scripting doc (broken link) any idea where else I can find it.

    ReplyDelete
    Replies
    1. IBM 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.

      Delete
    2. The original doc is hosted on developerWorks website that is under maitenance.
      I have shared my copy here.

      Delete
    3. Hi Bruno, I have some security issues on browsers trying to enter into your shared copy. How can I get it?

      Thanks

      Delete
  5. Dear Bruno,

    Thank you very much for sharing the document on "Automation Scripts" with Maximo 7.5

    ReplyDelete
  6. 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 --
    In 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,

    ReplyDelete
  7. Unfortunately most examples in the doc. are in Jython (why do IBM selected Jython, instead of Rhino [i.e. JavaScript] is beyond me).

    I 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.

    ReplyDelete
    Replies
    1. The engines that are supported in an
      OOTB Maximo 75 are
      1. Mozilla Rhino (JavaScript) which ships with the IBM/Oracle(Sun) JDK
      2. Jython which is included as part of Maximo

      Delete
  8. Hi Everyone
    I'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 :(

    ReplyDelete
  9. Hi,
    Is it possible to launch a script when a record is created via MIF?
    for example when creating ticket through an MIF web service.

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Hi

    How 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?

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. Hi Sir,

    I'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!

    ReplyDelete
  14. Hi Bruno,

    I 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. :)

    ReplyDelete

Note: Only a member of this blog may post a comment.