Friday, 10 February 2012

Maximo jre versions


  1. Maximo 7.6 supports jre 1.7
  2. Maximo 7.5 supports jre 1.6
  3. Maximo 7.1.x supports jre 1.5
  4. Maximo 6.x supports jre 1.4
  5. Maximo 5.x supports jre 1.3
 

Setup Maximo in Eclipse

To create a Maximo environment in Eclipse, follow below steps

To create a Maximo Mbo classes in Eclipse:


1. Install Eclipse J2EE version.
2. Create a new Java project. (Eg. name: Maximo Mbo Classes)
3. Go to Java Build Path: click on Add external jars
4. Browse up to <maximoroot>/maximo/applications/maximo/lib and select all (ctrl+a)
5. click add/ok.
6. Click on add class folder and browser <maximoroot>/maximo/applications/maximo/businessobjects/classes and click ok.
7. Create a new package.
8. Create a new class and enter super class as any mbo (psdi.app.po)  (For e.g. public class Test extends PO )

To create a Maximo Bean classes in Eclipse:

1. Create a new Java project. (Eg. name: Maximo Bean Classes)
2. . Click on add class folder and browser <maximoroot>/maximo/applications/maximo/maximouiweb/web-inf/classes and click ok.

Creating a new Maximo Service

Upon Maximo start up all the services will initialize. These services are stored in MAXSERVICE table.

To create a new Service in Maximo 7.1, follow the steps

Step 1: Go to Database configuration --> List Tab
Step 2: Click on "Select Action Menu" and select "Services"
Step 3: A dialog box will open and display all the services.
Step 4: Click on New Row.
Step 5: Enter your service name and class name (service class) path.
Step 6: Enter id as 1000 or above and click ok.
Now new service is created.

Note: To create a Maximo custom service class you need to extend AppService class. If you want to use this service class methods in your mbo classes, you have to define your method as static.

Tuesday, 18 October 2011

How to make object readonly or editable by using maximo API coding?

To make Object Readonly: setFlag(7L,true);
To make Object Editable: setFlag(7L,false);

Note:
1.If object is readonly, can't make fields editable in that object.
2. If object is readonly, then make object editable using setFlag(7L,false);. Now all the fields will be editable, and make other fields readonly by using setFieldFlag("<attributename>",7L,true);

Tuesday, 4 October 2011

How to Initiate Work Flow in maximo 7 through coding?

Step 1: import psdi.server.MXServer;
            import psdi.workflow.WorkFlowServiceRemote;
Step 2: Now write the below code in your method:

            try
             {
                  MXServer mx = MXServer.getMXServer();
                  WorkFlowServiceRemote wfsr = (WorkFlowServiceRemote)mx.lookup("WORKFLOW");

                   RFQRemote  rfq = (RFQRemote)getMbo();
                   wfsr.initiateWorkFlow("<work flow name>",rfq);
              }
              catch(Exception e)
             {
                  e.printStactTrace();
              }

Note: i) In the above sample code, I was initiated work flow of RFQ. So I used RFQRemote. Like that you can use your required application remote class. For example: If you want to initiate PO work flow, then you have to PORemote instead of RFQRemote.
          ii) initiateWorkFlow("<here you have to give WF name which you want to initiate>", <here you have to give MBO name, in the above example "rfq" is the instance of RFQRemote which is storing mbo of RFQ>);

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.

Wednesday, 14 September 2011

How to add warnings in Maximo 7.x ?


Below is the syntax to add warnings in maximo 7.x :
getThisMboSet()).addWarning(new MXApplicationException(msggroup, msgkey, params));

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