This is always a tricky area.
The weaknesses listed for the OOB functionality are pretty much spot on - doing things properly can be time consuming and frustrating.
The benefits miss out a positive – the OOB functionality gets tested by IBM.
While the testing has its limits it is certainly useful it will be preventing some issues.
The automation script weaknesses you list are dangerously incomplete / flawed.
The biggest scripting weaknesses that aren't covered are:
- IBM Support will not look at a case where custom code, e.g. a script, has fired
- Resource leaks
- Spaghetti code – this is hinted at
- Easier to bypass change control procedures
IBM Support will not look at a case where custom code, e.g. a script, has fired
--
They won't support a problem in a script – This is understandable but it would get painful for this organisation if the developer moves on and the replacement doesn't have lots of experience with scripts
IBM won't look at an unrelated problem if a script has executed e.g. A script is triggered while saving a WO. The script simply changes one value on a custom field (i.e. nothing that the core Maximo code will interact with) and then calls the MBO Save operation – the MBO Save then fails because of a problem with the core code.
In this case the customer has to replicate the problem without involving the script – that can be very difficult.
Spaghetti code
--
This is one of the biggest weaknesses of code – it gets very difficult to trace which scripts are interacting with a transaction.
If scripts aren't designed properly then they can become a nightmare e.g. if there are 5 scripts triggered by a WO save. One aspect that people forget is that there is no way to predict/control the order of script execution.
So the first time you save the WO the scripts could fire like this:
Script1, Script2, Script3 …
The second time it could be like this:
Script1, Script3, Script2 …
And the third time…
Script4, Script3, Script2 …
So you have to design your scripts so they can run completely independently and safely….
OR you merge scripts together so you control the flow…. – this is the ideal solution from Support's position / future maintenance
Developers tend to avoid merging the scripts because it is a lot more work and it means more retesting…
I am working on a capability that will trace the execution flow and highlight things that could be impacted e.g. which automation scripts / domains etc – it is a very complex task particularly when you realise that a line of automation script code could implicitly trigger other scripts e.g. by saving a workorder.
Its all in one place – for now.
--
Having the scripts in one place is fine for now but the developer can't guarantee that the next person will be as comfortable with scripts or that the organisation won't strictly enforce a rule to move back to OOB functionality
It is easy to see how rising script maintenance costs will lead to a management rule to use OOB functionality where possible
Resource leaks
--
Writing Automation scripts is relatively easy but Maximo's complexity means that it is also easy to create memory leaks that over time will degrade the performance of a JVM or kill it completely.
I spend a significant portion of my time investigating these even with my powerful toolset.
Vetasi offer an automated service to check automation scripts for bad practices / potential leaks. We also have automated tools to speed up the process of resolving performance problems.
Easier to bypass change control procedures
--
It is much easier to implement a "quick fix" to a script and so bypass change control procedures.
Change controls are important to help ensure that things are tested and that administrators understand what things could be causing a problem e.g. If this worked last week then what changed in the last 7 days?
Ultimately each organisation needs to make a decision about the best way forward.
Personally I prefer using the OOB features where possible.
------------------------------
Mark Robbins
Support Lead/Technical Design Authority / IBM Champion 2017 & 2018 & 2019 & 2020 & 2021
Vetasi Limited
https://www.linkedin.com/pulse/maximo-support-advice-from-non-ibm-engineer-article-mark-robbins/------------------------------