Maximo Application Suite Appbean – UI Development – Developer tips

What is the Maximo Application Suite?
Please also read:
https://www.linkedin.com/pulse/ibm-mas-manage-ui-bean-scripting-andrzej-wieclaw-4vtbf/
Why is it worth using AppBeans?
Firstly, the methods give the scripts a modern look. This makes AI-supported development easier. For example, it does not make sense to automatically document a code section if the block begins with a start point condition. You can further reduce development time by eliminating the need for custom Java classes.
The context classes
We will now take a closer look at the class.
The matrix shows that some methods are only available or useful in certain use cases.

At first glance, the unavailability of some methods does not seem to make sense. Due to the different use cases, not all data is always available. Take getMbo(), for example. A user has not yet selected an entry in a list. This means that a main record has not yet been determined. Andrzej’s idea of a UI library script is therefore good for standard tasks. In this example, the reference to the Script Service class is immediately apparent.

The practice
So much for the theory. The requirement is that the user should not be able to approve capital projects in list editing mode. This means that the status dialogue should not open if at least one work order on the List tab has the work type CP.

What can you learn from this script? The input method STATUS is capitalised. This can lead to conflicts with the linter (code checker), but is necessary in order to retain the exact result name. The script was split into several methods, which were commented using an AI tool. This makes it easier for colleagues to find their way around.
A key feature is the ability to interrupt event execution via the context and the setEventHandled() method. No separate bean class is required – an automation script is sufficient.
A separate message should be created, making the constant at the beginning superfluous.
Would you like to take your automation to the next level with AppBeans? As the largest MAS partner in the DACH region, we can support you with in-depth expertise and practical solutions.