Maximo automation script was introduced for the first time in version 7.5. Since then, it has evolved big time and is now one of the most powerful and commonly used applications by the developers for most of the development.
Scripts are a kind of replacement for java classes. Before
Maximo 7.5, developers had only one choice of writing java classes to customize
the product functionality. With java classes, there were some pros and cons such
as skill set, server downtime etc. IBM has done a great job in revolutionizing automation
scripts over the past few years. With Maximo Application Suite (MAS), developers
will be able to perform all kinds of customizations (including beans) and there
is no need to write any java classes. Though scripts are the way to go in
future, it should not always become an obvious choice. One of my earlier Blogs
compare’s scripts and java in various aspects which may help you to some extent
in taking a decision.
Every automation script consists of launch point, variables, and actual code. Automation scripts can be written at below levels:
- Mbo, field
- Integrations
- Actions
- Custom Condition
- Beans (available in MAS)
MBO (Object) Automation Script:
Object level scripts (object launch point) are created when we must perform any business logic, actions, validations etc. when the record/object is initialized/created/updated/deleted. Below screenshot shows various events available on object launch point. I will be explaining these in detail in the future blog.
Field/Attribute Automation Script:
Attribute level scripts are created when we want to trigger
an action, initialize field values, make fields required/read only, perform
validations etc. as soon as the attribute value is updated. Below screenshot
shows various events available on attribute launch point.
Integration Automation Script:
Integration scripts are written for inbound, outbound
integrations when we want to do certain validations on some of the fields,
change actions on the payload, skip transactions, add/remove fields in the
payload request etc. before the data is consumed (in Maximo) or exported (out
of Maximo). There are lot of other things that can be done with integration
scripts and those will be covered in future blogs.
Action Automation Script:
Maximo has few out of the box actions which comes as a part
of Maximo product, and we can also create custom actions using action
application. With custom action script, we can perform multiple validations/checks
inside the script before triggering an action.
Custom Condition Automation Script:
Like action script, custom condition script can perform
validations/checks and return either true or false. Returned value is then used
to take appropriate actions. A condition needs to be created in the conditional
expression manager and attach this script in the condition as “Class” (Type of
condition). Later this condition can be attached to a sig option so that it
gets evaluated based on the code written inside the condition script.
Custom condition script can be directly attached to a
workflow condition node and depending upon the script output (true/false),
workflow will follow the appropriate path.
Bean Automation Script:
Bean classes (app and data bean) are designed more towards
handling UI level logic. Till Maximo Application Suite (MAS), scripts were not
supporting to handle bean class functionality completely although some basic
stuff such as open a dialog, close a dialog are available in 7.6.x version. In
MAS, IBM has provided flexibility to call the bean class methods from inside an
automation script. Such script names follow a certain format like, for app bean
script name should be in the format of APPBEAN.<APPNAME> (APPBEAN.ASSET).
“mxe.script.allowbeanscript” system
property needs to be enabled so that script understands that it needs to invoke
a bean method. Also, a checkbox, “Allow Invoking Script Functions” needs
to be enabled at script level so that the bean method call is accepted and
invoked.
No comments:
Post a Comment