Tuesday 4 October 2011

How to add parameters in crontask (maximo 7)?

Step 1. import psdi.app.system.CrontaskParamInfo;
Step 2. import java.rmi.RemoteException;
Step 3:
public class CustomCronTask  extends SimpleCronTask{
 public CrontaskParamInfo[] getParameters() throws MXException,RemoteException
{
   CrontaskParamInfo parameters[] = new CrontaskParamInfo[2];
   parameters[0] = new CrontaskParamInfo();
   parameters[0].setName("Parameter 1");
   parameters[1] = new CrontaskParamInfo();
   parameters[1].setName("Parameter 2");
   return parameters;

}
}
Step 4: ***** This is very important *****
        i) If it is a new crontask, after creating an instance, parameters will display on the screen.
        ii) If you are adding parameters to the existing crontask, then you have to create a new crontaskinstance and save the record. Then parameters will display on the screen.

1 comment:

Unknown said...

I have added the cron task parameter class and then placed at the location. I am getting the error that attribute does not exists when trying to create a new instance of the crron task

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...