Monday 20 April 2015

Throw warning in Maximo Automation Script

To throw warning in automation script:

warning = MXApplicationException(msggroup, msgkey, msgparams);
mbo.getThisMboSet().addWarning(warning);



 

Throw error in Maximo Automation script

In Maximo, all messages like errors, warnings and info are available in maxmessages table with msgkey and msggroup.

To throw an error in autoscript:

errorgroup=<msggroup>
errorkey=<msgkey>

In case of parameters:
errorgroup=<msggroup>
errorkey=<msgkey>
params=[<param1>,<param2>...etc]

For example I have created an error message in maximo using database administration --> Messages

msggroup = TESTGRP
msgkey = TESTKEY
msgvalue = "This is a test message"

in automation script, it is easy to display error message by using below code:

errorgroup=TESTGRP
errorkey=TESTKEY

in case of params:

For ex: my message value has : msgvalue = "This is a test message by {0}"

errorgroup=TESTGRP
errorkey=TESTKEY
params=[user]


 

Maximo Automation Script - Create Action Launch Point

It is simple to create a action launch point.

In my case, I have created a sigoption in Purchase Order application.

1. Sigoption name is : CREATEPOEXT - by using app designer

In sigoption --> Advanced Signature Options --> select the radio button "This is an action that must be invoked by user in the UI"

Give the position in your select action menu in app designer.

Grant access to this sigoption in your security group applications.

2. Automation script

Go to System Configuration --> Platform Configuration --> Automation Script application
From list tab --> Select "Create" --> click on "Script with Action Launch Point"

Enter Launpoint name same as your sigoption created for your application:
Launpoint : CREATEPOEXT
Active: Yes
Object: PO
Action: CREATEPOEXT
Note: Action name will auto generate same as launch point name.
Click next and enter your variables and automation script. Save the record. That's it.

3. Main point is, you don't have to create a Action separately in Actions applications.
for ex: Action "CREATEPOEXT" automatically created in Action applications.

Action will be created like below, in our case:

Action: CREATEPOEXT
Object: PO
Type: Custom Class
Value: com.ibm.tivoli.maximo.script.ScriptAction
Note: Above value is common class for all action launch point related actions.
Parameter: CREATEPOEXT,CREATEPOEXT,CREATEPOEXT
In parameter, you noticed that there are three values. Let me explain what are they
1. Script name
2. Launch point name
3. Action name
in my case all names are "CREATEPOEXT"

So by any chance, if you miss any of those values in your "parameter" field of action, then it will throw error at the point of automation script execution.

 

Maximo SOAPUI error javax.xml.ws.WebServiceException

SOAPUI error while sending payload to below url (in cluster environment) http://localhost:9080/meaweb/services/MXASSET Error : <f...