Customize your System Using Tivoli Automation Scripts

Customize your System Using Tivoli Automation Scripts

Customizing your system using JAVA class requires restarting the system and deploying the application. But there is a more efficient way: automation scripts in IBM Control Desk (ICD). The restarting problem is eliminated, the development is much faster and more efficient. That’s the main reason to use automation scripts wherever possible.


When can we use scripts?

Scripts can't always be used for all situations, but for validating forms, creating more complex actions, creating more complex conditions, and when a record is created or saved, a script is simple to use and a great way to customize the system. The script can also be easily used to create offering catalog item functionality and to create integration with other systems.


Programming languages

Multiple programming languages can be used for scripting, e.g., Python, jythom, JavaScript and, since version 7.6.1, also Oracle Nashorn. The automation script has two main parts, the script itself and the launch point, which is a trigger that defines the conditions for running the script.


How to create an automation script

A script can be created with these Launch points:

  • Event on an attribute - typically validation of form values, this can avoid creating validation JAVA business classes.
  • Event on the object - creation, deletion, modification of the object record, all these actions can trigger the script execution. The script can be executed before or after saving the record.
  • Actions - offers to create more complex actions than just setting an attribute value or changing the state without the need to write JAVA class. The action can be normally used for example in workflow or escalation.
  • Condition - as with the action, the condition can be much more complex than just an SQL query, again, it is not necessary to create a JAVA class for more complex conditions.
  • Integration - allows you to create scripts to handle incoming and outgoing, such as REST API requests.

It is possible to create a script without a launch point to be used when customizing the items of the offering catalog, or as a "library script" that is good for encapsulating some re-usable logic.


In my experience, using scripts speeds up and simplifies the development of system customizations. Therefore, I recommend using them wherever possible. Want to know more about automation scripts? I would be more than happy to share my experience. Write me an email!


Thank you for your time,


Jaroslav
Senior ServiceNow Consultant