Maximo automation scripting

This document is a Work in Progress

This document is not intended to be a substitute for the official Maximo API documentation. If any contradiction is present, you must consider the official documentation as the source of truth.

You must have a basic knowledge about Maximo Asset Management and development, mainly Java, XML and HTTP requests. You must be also familiar with Maximo applications and modules.

About the Maximo automation scripting repository

Welcome to the Maximo automation scripting repository. Join us and use this technical repository to share ideas, solutions, and problems with other Maximo developers. The goal of this repository is for users to learn and share customizations that use scripting in Maximo Asset Management.

NOTE: This repository is not intended to act as a communication channel to Maximo Support regarding defects. Use the normal support channels for reporting defects.

It is important to note that automation scripts are custom code. Support does not engage in writing scripts or debugging custom scripts. Any atuomation scripts that are provided in this repository by IBM or others are intended to be samples and are not supported by IBM.

About Maximo automation scripts

An automation script consists of a launch point, variables that have corresponding binding values, and the source code. You use wizards to create the components of an automation script. You create automation scripts and launch points or you create a launch point and associate the launch point with an existing automation script.

Prerequisite skills

To automate tasks, you must have knowledge in the following areas:

  • Scripting language syntax and operations
  • Product configurations, such as workflow processes, escalations, and actions
  • Application data models and relationships

Experience with Maximo® business object (MBO) API is an advantage although not a prerequisite.

Components of automation scripts

For an automation script to run, you specify the following components:

  • A launch point that defines the context for the script to run
  • Variables and corresponding binding values
  • Source code written in a supported scripting language

Launch point

A launch point defines the execution context for an automation script, for example when a business object is updated or a value is entered into a field. Some types of launch point are supported and the Automation Scripts application provides a separate wizard application for creating each type of launch point.

Variables and binding values

You can specify the variables that determine how information is passed into or received from an automation script in the wizard applications. Variables are not mandatory, but when you use variables it simplifies the amount of code that is written and makes it easier to reuse the code.

Source code

You can write source code in an external application and import it into the Automation Scripts application. Alternatively, you can enter code directly into the **Source Code** field in the wizard applications. The source code must be written in the languages that are supported by the following script engines:

    Mozilla Rhino, version 1.6 release 2
    Jython, version 2.5.2

Environment prerequisites

You must have an active Maximo user account to use these APIs.

Getting Start with Maximo automation scripting

This section is intended to get you started with the basics of automation scripts, including which application to use, which fields to use, and how you can run your automation scripts.

Maximo automation scripts

Automation scripts are small, targeted pieces of code that can be authored, saved, and instantly activated in a Tivoli's Process Automation Engine-based product environment to extend the product. Automation scripts were first introduced with the 7.5 release of Tivoli's Process Automation Engine. Since this release, the capability has been welcomed and adapted by clients and implementers as an accelerated approach to implementing the desired solution.

This README.MD document serves as a landing page for learning and experimenting with automation scripts. Links will be added to other sources of automation script information that may be published by IBM or the broader user community. Examples of scripting will be listed here over time.

Maximo Automation Scripting & Sample Packages

The following recipes can help you get started with automation scripts:

Sample ID Sample Description & Sample Link
01 Creating and import an automation script
02 Automation script that sets actual dates from scheduled dates when a work order is completed.
03 Automation script makes the workflow follow the status privileges that are defined by Security Groups
04 Notify users of material and service receipts
05 Worklog condition
06 Use sequence instead autokeyn
07 Date Calculation - Part 1
Date Calculation - Part 2
Date Calculation - Part 3
08 Scripting report execution
09 Extending email listener by using scripting
10 Turning off a Maximo built-in business rule by using scripting
11 How to import/export an automation script into a .dbc file.

Maximo automation scripting official documentation:

Official Documentation - Maximo Automation Scripting 7.5

Official Documentation - Maximo Automation Scripting 7.6

Document references

IBM developerWorks

Scripting with Maximo Wiki

Scripting with Maximo.pdf

Collection of Automation Scripts for Maximo

Important references

NOTE: Scripts are pieces of code. Products that are based on Tivoli's Process Automation Engine version 7.5 ship Jython and JavaScript engines to support automation scripts. The ability to use the right syntax and develop programming logic is a prerequisite to using automation scripts. These links provide significant details and examples on basic programming with Jython and JavaScript.

Jython Tutorial

Rhino JavaScript Documentation

Automation scripting is built on top of the Java JSR-223 standard for using scripting languages in a Java Virtual Machine. This link provides the specification details for the JSR-223 standard.

JSR-223 specification