IBM Support

A Maximo Scripting Solution to a Plain Text Problem

Technical Blog Post


Abstract

A Maximo Scripting Solution to a Plain Text Problem

Body

with Steve Haupman, Anamitra Bhattacharyya and Sampath Sriramadhesikan (IBM US)

 

Introduction

The purpose of this article is to present a technical solution using Maximo Automated Scripting to the problem of plain text white space content via email appearing flattened in the SR ticket Rich Text Editor (RTE). 

 

Creating the Script

Navigate to: System Configuration > Platform Configuration > Automation Scripts then Select Action > Create > Script with Attribute Launch Point

 

Step 1: Create the attribute launch point as follows

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 2:  Import the script (or space will be provided for you to type this in during Step 3) and map the attribute to a variable to be used in the script.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Script imported in this example:
 

Note that the LD field will be processed non-interactively, that is, when the field is not populated via the user interface.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 3

Verify the imported script (or type it in/make modifications).  Syntax checking is performed upon create.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

To activate the script, Select Action > Change Status > New Status: Active

 

Without the script

... an incoming plain text email appears flattened in the RTE despite the white space being present in the database field

Logging at point LDTEXT db field is written:


22 May 2013 08:03:42:083 [INFO] [MXServer] [CID-CRON-252] BMXAA6721I - Bind value for LDTEXT = by John Donne
No man is an island,
Entire of itself.
Each is a piece of the continent,
A part of the main.
If a clod be washed away by the sea,
Europe is the less.
As well as if a promontory were.
As well as if a manner of thine own
Or of thine friend's were.
Each man's death diminishes me,
For I am involved in mankind.
Therefore, send not to know
For whom the bell tolls,
It tolls for thee.

 

SR Details:

image

 

 

 

 

 

 

 

With the script

... the plain text white space is replaced with the HTML equivalent.

SR Details:

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

References

Scripting with Maximo [article]

Scripting with Maximo [pdf] same title as above except with a lot more detail

Customizing with Automation Scripts [article]

 

 

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11131435