SlideShare a Scribd company logo
MaxTECH Technical Training
Creating Custom Audit Solution
“Building a better mousetrap….”
Stephen Hume – Senior Maximo Consultant
Course Objective
BPD Zenith UK | Canada | USA | Australia | New Zealand 2
The objective of this course is to show you how to build a Custom Audit Solution in your Maximo
system which will provide pinpoint accuracy for the auditing of key system data.
Concepts and tools utilized:
- Database configuration (custom table)
- Relationships
- Application Design – be wary of adding new tab to an application
- Automation Script – Script Creation
- Automation Script – Launchpoint creation
Business Requirements
The business requirement which led to the development of this Custom Audit Solution was as follows:
During the development of the Incident Management application for a Maximo HSE implementation, the business users
indicated that they wanted specific fields of the incident record audited for any changes that were made during the lifecycle of
the Incident Record. They also wished that some of the fields on linked tables could also be audited.
The second part of this audit requirement was that they wanted this audit data to be visible in the Incident application and that
the required information to be displayed included the following:
• Database Table
• Attribute
• Old Value
• New Value
• Date Changed
• Who Changed It
It was determined that the OOTB audit solution could be used to meet this requirement, however it would not be easy to
display the required audit details within the Incident Record. Maximo audit records only store the changed values and hunting
down the corresponding audit record to find the “before” value of a changed field would be difficult.
BPD Zenith UK | Canada | USA | Australia | New Zealand 3
Step by Step Instructions (Create Table)
Create table BPDAUDIT (or use your company naming standards).
BPD Custom Attribute Audit Table
When you create a new table in Maximo, the system adds a description attribute by default.
This will not be needed so should be deleted before the new table is saved.
TIP
BPD Zenith UK | Canada | USA | Australia | New Zealand 4
Attribute Description Type Length Title Same As Object Same As
Attribute
Search Type
CHANGEBY User ID that made the change UPPER * Change By PERSON PERSONID WILDCARD
CHANGEDATE Date the change was made DATETIME 10 Change Date EXACT
BPDAUDITID Bbpauditid BIGINT 19 Bpdauditid EXACT
NEWVALUE New value of the field after the
change
ALN 2000 New Value WILDCARD
OLDVALUE Original value of the field
before the change
ALN 2000 Old Value WILDCARD
OWNERATTR Attribute which was changed UPPER 50 Attribute Changed MAXATTRIBUTE ATTRIBUTENA
ME
WILDCARD
OWNERID Unique ID of the record that
was changed
BIGINT 19 Record ID EXACT
OWNERTABLE Table of the record which was
changed
UPPER 30 Table Changed MAXOBJECT OBJECTNAME WILDCARD
Once you save the
table, put thesystem into admin
mode and apply your
configurationchanges.
Step by Step Instructions (Create Relationships)
Create the following relationship on the table you are auditing:
Object: SR
Relationship: BPDAUDIT
Where Clause: ownertable = ‘SR’ and ownerid = :ticketuid
If you build an audit on tables which are linked to the SR Table then build the following relationship
Relationship: BPDAUDITALL
Where Clause:
(ownertable = ‘SR’ and ownerid = :ticketuik) or
(ownertable = “XXXXXX’
and ownerid in (select XXXXXXUID from maximo.XXXXXX
where ticketid = :ticketid))
Remarks: Relationship to get the audit details for SR and child tables
Create the following relationships on the BPDAUDIT Table.
Object: BPDAUDIT
Relationship: MAXATTRIBUTE
Where Clause: objectname = :ownertable and attributename = :ownerattr
Child Object: MAXATTRIBUTE
Remarks: Relationship to the maxattribute table to get the attribute details
Relationship: MAXOBJECT
Where Clause: objectname = :ownertable
Child Table: MAXOBECT
Remarks: Relationship to the maxobject table to get the object details
BPD Zenith UK | Canada | USA | Australia | New Zealand 5
Only use BPDAUDITALL
if you are wantingto audit tableslinked to your table
(in this case SR)
‘XXXXXX = your
child table’
Step by Step Instructions (Configure SR Application)
Now is the time to add a spot for the audit information in the application you will be auditing.
In the case of the Incident Application, the users wanted the audit data visible on a new tab in the application.
This is the direction that will be demonstrated today.
Step 1: Open SR Application in Application Designer
Step 2: Export the SR application, and save the XML to your desktop. (create a backup copy of the XML also).
Step 3: Edit the SR XML using Notepad ++ to manually create a new TAB, add the SR Header Section to the TAB
and add a Section where the Audit Table will be displayed. Save your manual changes and import the revised
XML into the application designer in Maximo.
Step 4. Add the Audit table to the application
using application designer. Select all of the
attributes to be displayed in that table,
set the table to “read only” and
save your changes.
BPD Zenith UK | Canada | USA | Australia | New Zealand 6
Take care whenadding a new tabto an applicationin Maximo.
If you use
application designerthe application canbecome corrupt.
When you open the SR application the Audit table will initially be blank until the
script is created to write audit records.
TIP
Step by Step Instructions (Original Script)
Original script:
This script is written to produce audit records for any attribute that
has been changed, except for specific attributes which may be
skipped. (CHANGEBY, CHANGEDATE and non-persistent attributes).
The problem with this approach is that it is a shotgun approach,
creating audit records that the business uses may not be interested
in.
When a new Incident was created, this script generated and audit
record for every incident attribute in the view. (Thousands of audit
records).
BPD Zenith UK | Canada | USA | Australia | New Zealand 7
Step by Step Instructions (Improved Script)
This new script achieves a number of things.
1. It uses a variable to store the list of
attributes to be audited (so that not all
changes will result in creation of an audit
record).
2. It retrieves the hierarchy path if the
attribute being audited is a
classstructureid (more user friendly)
3. It converts booleans (yes or no) to Yes
and No instead of zero and 1.
4. It is completely reusable to audit any
table in Maximo. Just need a new launch
point.
BPD Zenith UK | Canada | USA | Australia | New Zealand 8
Step by Step Instructions (Create Script)
In Automation Scripts Create >> Script
Script: BPD Audit
Description: Object: Multiple, Event: Save, Description: Audit specific attributes
Script Language: Jython
Variable: attrList Comma-separated list of attributes to be audited
Variable Type: IN
Binding Type: LITERAL
Binding Value: UNDEFINED
Source Code:
BPD Zenith UK | Canada | USA | Australia | New Zealand 9
Source code can be
Copied directly to
Maximo
Increase Font Size
Here to read details.
from psdi.mbo import MboConstants
from psdi.server import MXServer
from psdi.util import MXFormat
mxServer = MXServer.getMXServer()
auditSet = mbo.getMboSet(“BPDAUDIT")
def createAudit(attribute):
mbv = mbo.getMboValue(attribute)
audit = auditSet.add()
audit.setValue("OWNERTABLE", mbo.getName())
audit.setValue("OWNERID", mbo.getUniqueIDValue())
audit.setValue("OWNERATTR", attribute)
audit.setValue("CHANGEDATE", mxServer.getDate())
audit.setValue("CHANGEBY", user)
if attribute != "CLASSSTRUCTUREID":
# For all normal attributes save the old and new values
audit.setValue("OLDVALUE", mbv.getInitialValue().asLocaleString())
audit.setValue("NEWVALUE", mbv.getString())
else:
# For classifications save the hierarchy path
oldClassStructureSet = mbo.getMboSet("$CLASSSTRUCTURE_OLD", "CLASSSTRUCTURE", "classstructureid = '%s'" % mbv.getInitialValue())
oldClassStructureSet.setFlag(MboConstants.DISCARDABLE, True)
oldClassStructure = oldClassStructureSet.moveFirst()
if oldClassStructure:
audit.setValue("OLDVALUE", oldClassStructure.getHierarchyPath())
newClassStructureSet = mbo.getMboSet("$CLASSSTRUCTURE_NEW", "CLASSSTRUCTURE", "classstructureid = '%s'" % mbv.getString())
newClassStructureSet.setFlag(MboConstants.DISCARDABLE, True)
newClassStructure = newClassStructureSet.moveFirst()
if newClassStructure:
audit.setValue("NEWVALUE", newClassStructure.getHierarchyPath())
for attribute in attrList.split(','):
if mbo.isModified(attribute):
createAudit(attribute)
Step by Step Instructions (Create Launchpoint)
Object Launch Point: BPDAUDIT-SR Object: SR, Event: Save, Description: Audit specific attributes
Object: SR
Event: Save – Update
Launch Point Variable: attrList
Binding Value:
AFFECTEDDATE,AFFECTEDPERSON,LOCATION,ASSETNUM,PLUSGINCTYPE,REPORTEDPRIORITY,INTERNALPRIORITY,REPORTEDBY,URGE
NCY
BPD Zenith UK | Canada | USA | Australia | New Zealand 10
The Binding Valueis the list ofattributes to beaudited. It caninclude core orcustom attributes.
Attribute maximo.launchpointvars.varbindingvalue needs to be increased in length to
handle a longer list of attributes. We increased it to 1000 characters but it could be
made any length you require. This should be completed before doing the launchpoint.
TIP
Step by Step Instructions (Test SR Application)
Go to the SR application in Maximo. Open any existing SR that is not CLOSED or CANCELLED.
Click on the New Audit Tab.
There should be no records displayed in the Audit Table.
Go to the SR – Service Request Tab.
Change the data in one or more of the audited attributes.
Click on the Audit Tab.
There should be one record visible for each of the audited attributes that were modified.
Go back to the Service Request tab, change one of the fields that is not audited.
Back to the Audit tab and there should not be any new records created.
BPD Zenith UK | Canada | USA | Australia | New Zealand 11
The targeted auditfunction will onlycreate audit recordswhen one of thetracked attributesis changed.
When you open the SR application the Audit table will initially be blank until the
script is created to write audit records.
TIP
Step by Step Instructions (Add audit of linked table)
The next use case to explore is the need to audit attributes (fields) from a table other than the SR table that is related to the SR.
(In layman’s terms a sub-table).
In the Incident application there were several related tables added as part of the implementation, each of which has specific
audit requirements. In the OOTB SR application there are only a few related tables (Multiple Assets, Work Logs, Related Records). In
this example will use the Multiple Assets Table.
1. Go to the Automation Scripts application.
2. Create Script with Object Launch Point (BPDAUDIT-MULTIASSTLOCCI)
3. Description: Object: MULTIASSETLOCCI , Event: Save, Description: Audit specific attributes
4. Launch Point Variables attrList Binding Value ASSETNUM,COMMENTS,LOCATION
5. Script – Existing, BPDAUDIT
6. Click next, until you see the create button – click Create
This will create the new launch point – check to make sure that the Object Launch point has Events – Save
and Update checked along with the Before Save selected.
BPD Zenith UK | Canada | USA | Australia | New Zealand 12
If you have usedthe BPDAUDITALLrelationship, audit
records from anyrelated record that
You have createda launch point will
be displayed without
having to furtherconfigure the SRApplication!
This will create the new launchpoint – check to make sure that the Object Launch point has
Events – Save and Update checked along with the Before Save selected.
TIP
Thank You
I hope that this solution proves useful in any future projects/enhancements/audit requirements.
Regards,
Stephen Hume
Senior Maximo Consultant
BPD Zenith
stephen.hume@bpdzenith.com
About the Instructor:
Stephen has been working with Maximo for over fifteen years in a variety of industries (Oil and
Gas, Utilities, Transportation, Mining) He has taught Maximo courses to end users for both
Technical and Functional audiences.
As a previous member of the Canadian Maximo User Group Steering Committee Stephen is very
active in the Maximo community, preparing and delivery presentations at Maximo User Group
meetings and IBM Conferences throughout North America. He established the Maximo Technical
User Group (MaxTECH) which is aimed at providing networking and idea sharing for Maximo
Administrators, Analysts, Consultants and Developers.
BPD Zenith UK | Canada | USA | Australia | New Zealand 13
Reference Materials and Links
Link to the original concept:
https://www.linkedin.com/pulse/maximo-audit-new-approach-amir-samir/
Maximo Automation Scripting Community
https://www.ibm.com/developerworks/community/groups/service/html/communitystart?commu
nityUuid=4ed1bb0d-a7d4-4484-b114-660fbd269690
Integration Automation Scripts
https://www.bpdzenith.com/blog/integration-automation-scripts-maximo-7-6/
Scripting report execution in version 7.5 and above.
https://www.ibm.com/developerworks/community/blogs/a9ba1efe-b731-4317-9724-
a181d6155e3a/entry/scripting_report_execution_in_7_511?lang=en
BPD Zenith UK | Canada | USA | Australia | New Zealand 14

More Related Content

PPTX
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
PDF
CREO TIPS & TRICKS
PPTX
DOCX
Google study questions
PPTX
MaxTECH Technical Training Presentation from MaximoWorld 2018
PDF
Canadian Maximo User Group Technical Training - Maximo Reporting 201
PPT
Introduction To Work Item Customisation
PPTX
Analysis Services en SQL Server 2008
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
CREO TIPS & TRICKS
Google study questions
MaxTECH Technical Training Presentation from MaximoWorld 2018
Canadian Maximo User Group Technical Training - Maximo Reporting 201
Introduction To Work Item Customisation
Analysis Services en SQL Server 2008

Similar to MaxTECH Technical Training - Maximo Custom Audit Solution (20)

PDF
Flavours - Classic/Technical BDD
PPT
Siebel Case Study Presentation Senthil Kumar
PDF
IntoTheNebulaArticle.pdf
PDF
IntoTheNebulaArticle.pdf
PDF
Apache Calcite Tutorial - BOSS 21
PPT
Df12 Performance Tuning
PPT
AVB202 Intermediate Microsoft Access VBA
PDF
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
PPT
oracle-reports6i
DOCX
Bis 245
PDF
Cucumber - use it to describe user stories and acceptance criterias
PDF
Hands On: Create a Lightning Aura Component with force:RecordData
PDF
Auditing and Monitoring PostgreSQL/EPAS
 
DOCX
Creating a data report in visual basic 6
TXT
PDF
Jaspersoft and Clarity PPM - Advanced Reporting with Data Warehouse
PPTX
Productionalizing ML : Real Experience
PDF
Agados-based Application Design Demo
PPT
Demo Guidebook 040110
Flavours - Classic/Technical BDD
Siebel Case Study Presentation Senthil Kumar
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
Apache Calcite Tutorial - BOSS 21
Df12 Performance Tuning
AVB202 Intermediate Microsoft Access VBA
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
oracle-reports6i
Bis 245
Cucumber - use it to describe user stories and acceptance criterias
Hands On: Create a Lightning Aura Component with force:RecordData
Auditing and Monitoring PostgreSQL/EPAS
 
Creating a data report in visual basic 6
Jaspersoft and Clarity PPM - Advanced Reporting with Data Warehouse
Productionalizing ML : Real Experience
Agados-based Application Design Demo
Demo Guidebook 040110
Ad

More from Helen Fisher (20)

PDF
Maximo - Management of Change (MOC) Implementation Best Practices
PPTX
Watson IoT at Think 2018
PPT
IBM Maximo and ISO 55000
PDF
BPD Zenith AMUG Presentation 2017
PPTX
Maximo 7.6.0.8
PPT
IBM Maximo for utilities T&D
PPTX
Maximo mobile work management in the hospitality industry
PPT
Maximo Oil and Gas 7.6.1 HSE: Incident Management overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Drilling and Completion Run Log overview
PPT
Maximo Oil and Gas 7.6.1 HSE Reports
PPTX
Maximo Oil and Gas 7.6.1 HSE: Overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Change Module options
PPT
Maximo Oil and Gas 7.6.1 HSE: Change Module Overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Standard Actions & Standard Action Groups overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Work Orders Job Plans Overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Solutions Overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Risk Assessment Risk Matrix Overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Asset List Routes
PPT
Maximo Oil and Gas 7.6.1 HSE: Action Tracking & Operational Actions overview
PPT
Maximo Oil and Gas 7.6.1 HSE: Regulatory Compliance overview
Maximo - Management of Change (MOC) Implementation Best Practices
Watson IoT at Think 2018
IBM Maximo and ISO 55000
BPD Zenith AMUG Presentation 2017
Maximo 7.6.0.8
IBM Maximo for utilities T&D
Maximo mobile work management in the hospitality industry
Maximo Oil and Gas 7.6.1 HSE: Incident Management overview
Maximo Oil and Gas 7.6.1 HSE: Drilling and Completion Run Log overview
Maximo Oil and Gas 7.6.1 HSE Reports
Maximo Oil and Gas 7.6.1 HSE: Overview
Maximo Oil and Gas 7.6.1 HSE: Change Module options
Maximo Oil and Gas 7.6.1 HSE: Change Module Overview
Maximo Oil and Gas 7.6.1 HSE: Standard Actions & Standard Action Groups overview
Maximo Oil and Gas 7.6.1 HSE: Work Orders Job Plans Overview
Maximo Oil and Gas 7.6.1 HSE: Solutions Overview
Maximo Oil and Gas 7.6.1 HSE: Risk Assessment Risk Matrix Overview
Maximo Oil and Gas 7.6.1 HSE: Asset List Routes
Maximo Oil and Gas 7.6.1 HSE: Action Tracking & Operational Actions overview
Maximo Oil and Gas 7.6.1 HSE: Regulatory Compliance overview
Ad

Recently uploaded (20)

PPTX
history of c programming in notes for students .pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Introduction to Artificial Intelligence
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
System and Network Administraation Chapter 3
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Transform Your Business with a Software ERP System
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
history of c programming in notes for students .pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Which alternative to Crystal Reports is best for small or large businesses.pdf
Reimagine Home Health with the Power of Agentic AI​
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Odoo POS Development Services by CandidRoot Solutions
VVF-Customer-Presentation2025-Ver1.9.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Introduction to Artificial Intelligence
Operating system designcfffgfgggggggvggggggggg
System and Network Administraation Chapter 3
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Nekopoi APK 2025 free lastest update
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
wealthsignaloriginal-com-DS-text-... (1).pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Transform Your Business with a Software ERP System
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf

MaxTECH Technical Training - Maximo Custom Audit Solution

  • 1. MaxTECH Technical Training Creating Custom Audit Solution “Building a better mousetrap….” Stephen Hume – Senior Maximo Consultant
  • 2. Course Objective BPD Zenith UK | Canada | USA | Australia | New Zealand 2 The objective of this course is to show you how to build a Custom Audit Solution in your Maximo system which will provide pinpoint accuracy for the auditing of key system data. Concepts and tools utilized: - Database configuration (custom table) - Relationships - Application Design – be wary of adding new tab to an application - Automation Script – Script Creation - Automation Script – Launchpoint creation
  • 3. Business Requirements The business requirement which led to the development of this Custom Audit Solution was as follows: During the development of the Incident Management application for a Maximo HSE implementation, the business users indicated that they wanted specific fields of the incident record audited for any changes that were made during the lifecycle of the Incident Record. They also wished that some of the fields on linked tables could also be audited. The second part of this audit requirement was that they wanted this audit data to be visible in the Incident application and that the required information to be displayed included the following: • Database Table • Attribute • Old Value • New Value • Date Changed • Who Changed It It was determined that the OOTB audit solution could be used to meet this requirement, however it would not be easy to display the required audit details within the Incident Record. Maximo audit records only store the changed values and hunting down the corresponding audit record to find the “before” value of a changed field would be difficult. BPD Zenith UK | Canada | USA | Australia | New Zealand 3
  • 4. Step by Step Instructions (Create Table) Create table BPDAUDIT (or use your company naming standards). BPD Custom Attribute Audit Table When you create a new table in Maximo, the system adds a description attribute by default. This will not be needed so should be deleted before the new table is saved. TIP BPD Zenith UK | Canada | USA | Australia | New Zealand 4 Attribute Description Type Length Title Same As Object Same As Attribute Search Type CHANGEBY User ID that made the change UPPER * Change By PERSON PERSONID WILDCARD CHANGEDATE Date the change was made DATETIME 10 Change Date EXACT BPDAUDITID Bbpauditid BIGINT 19 Bpdauditid EXACT NEWVALUE New value of the field after the change ALN 2000 New Value WILDCARD OLDVALUE Original value of the field before the change ALN 2000 Old Value WILDCARD OWNERATTR Attribute which was changed UPPER 50 Attribute Changed MAXATTRIBUTE ATTRIBUTENA ME WILDCARD OWNERID Unique ID of the record that was changed BIGINT 19 Record ID EXACT OWNERTABLE Table of the record which was changed UPPER 30 Table Changed MAXOBJECT OBJECTNAME WILDCARD Once you save the table, put thesystem into admin mode and apply your configurationchanges.
  • 5. Step by Step Instructions (Create Relationships) Create the following relationship on the table you are auditing: Object: SR Relationship: BPDAUDIT Where Clause: ownertable = ‘SR’ and ownerid = :ticketuid If you build an audit on tables which are linked to the SR Table then build the following relationship Relationship: BPDAUDITALL Where Clause: (ownertable = ‘SR’ and ownerid = :ticketuik) or (ownertable = “XXXXXX’ and ownerid in (select XXXXXXUID from maximo.XXXXXX where ticketid = :ticketid)) Remarks: Relationship to get the audit details for SR and child tables Create the following relationships on the BPDAUDIT Table. Object: BPDAUDIT Relationship: MAXATTRIBUTE Where Clause: objectname = :ownertable and attributename = :ownerattr Child Object: MAXATTRIBUTE Remarks: Relationship to the maxattribute table to get the attribute details Relationship: MAXOBJECT Where Clause: objectname = :ownertable Child Table: MAXOBECT Remarks: Relationship to the maxobject table to get the object details BPD Zenith UK | Canada | USA | Australia | New Zealand 5 Only use BPDAUDITALL if you are wantingto audit tableslinked to your table (in this case SR) ‘XXXXXX = your child table’
  • 6. Step by Step Instructions (Configure SR Application) Now is the time to add a spot for the audit information in the application you will be auditing. In the case of the Incident Application, the users wanted the audit data visible on a new tab in the application. This is the direction that will be demonstrated today. Step 1: Open SR Application in Application Designer Step 2: Export the SR application, and save the XML to your desktop. (create a backup copy of the XML also). Step 3: Edit the SR XML using Notepad ++ to manually create a new TAB, add the SR Header Section to the TAB and add a Section where the Audit Table will be displayed. Save your manual changes and import the revised XML into the application designer in Maximo. Step 4. Add the Audit table to the application using application designer. Select all of the attributes to be displayed in that table, set the table to “read only” and save your changes. BPD Zenith UK | Canada | USA | Australia | New Zealand 6 Take care whenadding a new tabto an applicationin Maximo. If you use application designerthe application canbecome corrupt. When you open the SR application the Audit table will initially be blank until the script is created to write audit records. TIP
  • 7. Step by Step Instructions (Original Script) Original script: This script is written to produce audit records for any attribute that has been changed, except for specific attributes which may be skipped. (CHANGEBY, CHANGEDATE and non-persistent attributes). The problem with this approach is that it is a shotgun approach, creating audit records that the business uses may not be interested in. When a new Incident was created, this script generated and audit record for every incident attribute in the view. (Thousands of audit records). BPD Zenith UK | Canada | USA | Australia | New Zealand 7
  • 8. Step by Step Instructions (Improved Script) This new script achieves a number of things. 1. It uses a variable to store the list of attributes to be audited (so that not all changes will result in creation of an audit record). 2. It retrieves the hierarchy path if the attribute being audited is a classstructureid (more user friendly) 3. It converts booleans (yes or no) to Yes and No instead of zero and 1. 4. It is completely reusable to audit any table in Maximo. Just need a new launch point. BPD Zenith UK | Canada | USA | Australia | New Zealand 8
  • 9. Step by Step Instructions (Create Script) In Automation Scripts Create >> Script Script: BPD Audit Description: Object: Multiple, Event: Save, Description: Audit specific attributes Script Language: Jython Variable: attrList Comma-separated list of attributes to be audited Variable Type: IN Binding Type: LITERAL Binding Value: UNDEFINED Source Code: BPD Zenith UK | Canada | USA | Australia | New Zealand 9 Source code can be Copied directly to Maximo Increase Font Size Here to read details. from psdi.mbo import MboConstants from psdi.server import MXServer from psdi.util import MXFormat mxServer = MXServer.getMXServer() auditSet = mbo.getMboSet(“BPDAUDIT") def createAudit(attribute): mbv = mbo.getMboValue(attribute) audit = auditSet.add() audit.setValue("OWNERTABLE", mbo.getName()) audit.setValue("OWNERID", mbo.getUniqueIDValue()) audit.setValue("OWNERATTR", attribute) audit.setValue("CHANGEDATE", mxServer.getDate()) audit.setValue("CHANGEBY", user) if attribute != "CLASSSTRUCTUREID": # For all normal attributes save the old and new values audit.setValue("OLDVALUE", mbv.getInitialValue().asLocaleString()) audit.setValue("NEWVALUE", mbv.getString()) else: # For classifications save the hierarchy path oldClassStructureSet = mbo.getMboSet("$CLASSSTRUCTURE_OLD", "CLASSSTRUCTURE", "classstructureid = '%s'" % mbv.getInitialValue()) oldClassStructureSet.setFlag(MboConstants.DISCARDABLE, True) oldClassStructure = oldClassStructureSet.moveFirst() if oldClassStructure: audit.setValue("OLDVALUE", oldClassStructure.getHierarchyPath()) newClassStructureSet = mbo.getMboSet("$CLASSSTRUCTURE_NEW", "CLASSSTRUCTURE", "classstructureid = '%s'" % mbv.getString()) newClassStructureSet.setFlag(MboConstants.DISCARDABLE, True) newClassStructure = newClassStructureSet.moveFirst() if newClassStructure: audit.setValue("NEWVALUE", newClassStructure.getHierarchyPath()) for attribute in attrList.split(','): if mbo.isModified(attribute): createAudit(attribute)
  • 10. Step by Step Instructions (Create Launchpoint) Object Launch Point: BPDAUDIT-SR Object: SR, Event: Save, Description: Audit specific attributes Object: SR Event: Save – Update Launch Point Variable: attrList Binding Value: AFFECTEDDATE,AFFECTEDPERSON,LOCATION,ASSETNUM,PLUSGINCTYPE,REPORTEDPRIORITY,INTERNALPRIORITY,REPORTEDBY,URGE NCY BPD Zenith UK | Canada | USA | Australia | New Zealand 10 The Binding Valueis the list ofattributes to beaudited. It caninclude core orcustom attributes. Attribute maximo.launchpointvars.varbindingvalue needs to be increased in length to handle a longer list of attributes. We increased it to 1000 characters but it could be made any length you require. This should be completed before doing the launchpoint. TIP
  • 11. Step by Step Instructions (Test SR Application) Go to the SR application in Maximo. Open any existing SR that is not CLOSED or CANCELLED. Click on the New Audit Tab. There should be no records displayed in the Audit Table. Go to the SR – Service Request Tab. Change the data in one or more of the audited attributes. Click on the Audit Tab. There should be one record visible for each of the audited attributes that were modified. Go back to the Service Request tab, change one of the fields that is not audited. Back to the Audit tab and there should not be any new records created. BPD Zenith UK | Canada | USA | Australia | New Zealand 11 The targeted auditfunction will onlycreate audit recordswhen one of thetracked attributesis changed. When you open the SR application the Audit table will initially be blank until the script is created to write audit records. TIP
  • 12. Step by Step Instructions (Add audit of linked table) The next use case to explore is the need to audit attributes (fields) from a table other than the SR table that is related to the SR. (In layman’s terms a sub-table). In the Incident application there were several related tables added as part of the implementation, each of which has specific audit requirements. In the OOTB SR application there are only a few related tables (Multiple Assets, Work Logs, Related Records). In this example will use the Multiple Assets Table. 1. Go to the Automation Scripts application. 2. Create Script with Object Launch Point (BPDAUDIT-MULTIASSTLOCCI) 3. Description: Object: MULTIASSETLOCCI , Event: Save, Description: Audit specific attributes 4. Launch Point Variables attrList Binding Value ASSETNUM,COMMENTS,LOCATION 5. Script – Existing, BPDAUDIT 6. Click next, until you see the create button – click Create This will create the new launch point – check to make sure that the Object Launch point has Events – Save and Update checked along with the Before Save selected. BPD Zenith UK | Canada | USA | Australia | New Zealand 12 If you have usedthe BPDAUDITALLrelationship, audit records from anyrelated record that You have createda launch point will be displayed without having to furtherconfigure the SRApplication! This will create the new launchpoint – check to make sure that the Object Launch point has Events – Save and Update checked along with the Before Save selected. TIP
  • 13. Thank You I hope that this solution proves useful in any future projects/enhancements/audit requirements. Regards, Stephen Hume Senior Maximo Consultant BPD Zenith stephen.hume@bpdzenith.com About the Instructor: Stephen has been working with Maximo for over fifteen years in a variety of industries (Oil and Gas, Utilities, Transportation, Mining) He has taught Maximo courses to end users for both Technical and Functional audiences. As a previous member of the Canadian Maximo User Group Steering Committee Stephen is very active in the Maximo community, preparing and delivery presentations at Maximo User Group meetings and IBM Conferences throughout North America. He established the Maximo Technical User Group (MaxTECH) which is aimed at providing networking and idea sharing for Maximo Administrators, Analysts, Consultants and Developers. BPD Zenith UK | Canada | USA | Australia | New Zealand 13
  • 14. Reference Materials and Links Link to the original concept: https://www.linkedin.com/pulse/maximo-audit-new-approach-amir-samir/ Maximo Automation Scripting Community https://www.ibm.com/developerworks/community/groups/service/html/communitystart?commu nityUuid=4ed1bb0d-a7d4-4484-b114-660fbd269690 Integration Automation Scripts https://www.bpdzenith.com/blog/integration-automation-scripts-maximo-7-6/ Scripting report execution in version 7.5 and above. https://www.ibm.com/developerworks/community/blogs/a9ba1efe-b731-4317-9724- a181d6155e3a/entry/scripting_report_execution_in_7_511?lang=en BPD Zenith UK | Canada | USA | Australia | New Zealand 14