Maximo Developer 101 – Getting Started
August 27, 2011 in by Michael Chrisman 0 Comments
So you want to be a Maximo developer. Well the first step is to setup your development environment. First you will need a Maximo development environment. This guide does not cover how to set that up.
Although you can technically use any Java IDE, IBM recommends Eclipse IDE. All documentation from IBM is for Eclipse as well as an add-on or two are available for it. So the next question is always “What version?” Any version of 3.1 or above. You can download Eclipse here: http://www.eclipse.org/.
Next you will want to download the setup guides from IBM:
Now these guides were created for Maximo 6 but they still work for Maximo 7 with the following changes
- The guide says Eclipse 3.1 but any newer version will work
- Step 1 of the Maximo Eclipse Developer Setup Guide says “Make sure that you have follow all the steps in the document MXES-Initial Eclipse 3.1.1 Setup”, this just means to make sure Eclipse is installed.
- Maximo 7 uses Java 1.5 while Maximo 6 uses Java 1.4
The setup guide talks about how to setup for doing MBO extension. This will also work for field classes and integration development. If you want to do screen development, then you will also need to add to your library the class folder %maximo%/maximouiweb/webmodule/WEB-INF/classes as this is where app beans and data beans are stored.
A couple of other useful tools are:
Maximo Developer : This is an Eclipse plug-in that helps automate the creation of Mbo Class extensions.
Maximo View Log : This is a web based tool for quickly viewing the Maximo Log
Maximo MIF Dev Tools : This is a web based set of tools for working with and testing Maximo Integrations. This includes the Maximo View Log tool.
At this point, you should have a development environment for doing your Maximo work.
Podcast Episode 1: What is an Interface?
February 23, 2010 in Maximo by Michael Chrisman 0 Comments
The first episode of the MaxCast podcast is now available. You can download the MP3 here: WhatIsAnInterface.mp3 or subscribe to the RSS feed here: http://feeds.feedburner.com/MaximoPodcast.
This week I talk about what is an interface and what you need to know to create one.
MIF- Invocation Channel
February 20, 2010 in Maximo, Maximo 7, Maximo: MIF by Michael Chrisman 0 Comments
An Invocation Channel is a way for Maximo to call an external SOA (ie, WebService) method. It provides ways to manipulate the outbound message as well as the response. That’s right, you can now have Maximo call an external web services or applications via a SOA definition.
Invocation Channels are outbound data only.
Fields
| FIELD | DESCRIPTION |
| Invocation Channel | This is a unique name for this record. |
| Description | This is a long description for the Invocation channel. |
| Operation | This is filled in by Maximo and will be “Invoke” |
| Adapter | This is the adapter this invocation channel should use. The default is “Maximo” |
| Endpoint | This is the endpoint of the data. The Endpoint is where you define the how to call the SOA application or web service. |
| User Defined | For any invocation channel you create this will be check. It is populated by Maximo. |
| Process Response? | If checked, then Maximo will process any data coming back from the SOA endpoint. It will also enable the Service Response fields. If the box is unchecked, then Maximo will ignore any response from the SOA endpoint. |
| Request Object Structure | This is the MOS (MIF Object Structure) that Invocation Channel is based on. Changed to this MOS will trigger the Invocation Channel. |
| Request Processing Class | This is the full java path to a processing class. You can use this class to do additional processing of the data before it is sent to the Endpoint. This is optional. |
| Request User Exit | This is the full java path to a User Exit class. You an use this class to do additional processing of the data before it is sent to the Endpoint. This is optional |
| Request XSL File | This is the of an XSL style sheet. You can use this the change the Maximo XML message structure to one the Endpoint likes. This is optional. |
| Response Object Structure | This is the MOS (MIF Object Structure) that the response is based on/will update. This is optional. If blank, then the Request Object Structure will be updated. |
| Response Processing Class | This is the full java path to a processing class. You can use this class to do processing of the data before it updates the MOS. This is optional. |
| Response User Exit | This is the full java path to a User Exit class. You an use this class to do additional processing of the data before it is sent to the Endpoint. This is optional |
| Response XSL File | This is the of an XSL style sheet. You can use this the change the inbound message XML message structure to one that Maximo likes. This is optional. |
This defines the Invocation Channel in Maximo.
From the Select Action menu, you can General Schema/View XML
The left side shows the outbound XML and the right is the response XML.
Obviously a key part to this is the Endpoint, which is where you define how to call the SOA application or web service. I will cover these in an other post.
MIF- Enterprise Services
February 20, 2010 in Maximo, Maximo 7, Maximo: MIF by Michael Chrisman 0 Comments
Enterprise Services are for inbound integration.
Fields
| FIELD | DESCRIPTION |
| Enterprise Service | This is a unique name for the enterprise service. |
| Description | This is a long description for the enterprise service. |
| Operation | This determines how this Enterprise Service will act. The Default is “Sync”. Other options are CREATE, DELETE, QUERY, SYNC and UPDATE. SYNC includes CREATE, DELETE and UPDATE functionality. If you select “QUERY”, then the Response fields will be enabled. |
| Object Structure | This is the name of the MOS the Enterprise service is based on. |
| Adapter | This is the name of the adapter the Enterprise Service will use. Unless you built your own adapter, this will be MAXIMO. |
| Multiplication Control | This is the name of a crossreference Integration Control the Enterprise service will use. |
| Interface Table | This is the name of the Integration Table. IF you are going to use integration tables, then this field is required. |
| Split Tag | This is the fully qualified XPATH to an XML node that you want to apply the split process to. |
| User Defined | Internal field. If you created the Enterprise Service, then this will be checked |
| Use External Schema? | Use this check box to denote that you will be using an external Schema. Checking this box will enable the Split Tag, External Schema Location and External Schema Element fields. |
| Inbound Processing Class | This is the java path to the processing class for the inbound message. |
| Inbound User Exit Class | This is the java path to the User Exit class for the inbound message. |
| Inbound XSL Map | This is the name of the XSLT to use to transform the inbound message. |
| Inbound External Schema File | This is the full path to the External Schema File. |
| Inbound External Schema Element | This is the element in the external schema that Maximo should use as the root element. |
| Response Processing Class | This is the java path to the processing class for the outbound message. |
| Response User Exit Class | This is the java path to the User Exit class for the outbound message. |
| Response XSL Map | This is the name of the XSLT to use to transform the outbound message. |
| Response External Schema File | This is the full path to the External Schema File. |
| Response External Schema Element | This is the element in the external schema that Maximo should use as the root element. |
The next section is the Object Structure Sub-Records. It list the MBOs that are part of the Object Structure you selected.
The bottom section is for processing rules. Each MBO can have it own set of processing rules. As it turns out, the processing rules have not changed from Maximo 6. As such I refer to those blog posts:
MEA Integration Interface Processing Rules Part 1
MEA Integration Interface Processing Rules Part 2
MEA Integration Interface Processing Rules Examples
Now let’s look at the Select Action Menu.
Add/Modify Additional Object Structure allows you to add other MOS’s to the Enterprise Service. I am not exactly sure the purpose of this but I suspect it is how you create a “merged object” in Maximo 7 (there was a check box in Maximo 6 for creating an interface based on non-related data. Additional MOS do not show up when you view the XML.
Fields:
| FIELD | DESCRIPTION |
| Object Structure | This is the name of the MOS. |
| Processing Class | This is the full java path to the processing class for this MOS. |
| User Exit Class | This is the full java path to the user exit class for this MOS. |
| Processing Order | This is the order in which the additional MOS will be processed. Additional MOS will always be processed after the primary MOS for the Enterprise Service. |
| XSL Map | This is the name of the XSLT to use to transform the data. |
| Multiplication Control | This is the name of a crossreference Integration Control the Enterprise service will use for this MOS. |
Next option is Gateway Properties. Gateway properties allows you to define additional tags that are in the header of the message. This allows you to grab the information and use it in the Interface.
Fields:
| FIELDS | DESCRIPTION |
| Interpreter Class | This is the full path to the java interpreter class. |
| Property | This is the name of the property |
| XML Tag | This check box denotes if the entry is an XML tag. |
| Value | This the value of the property. |
The Property, XML Tag and Value work in conjunction with each other. This is from the on-line help in Maximo:
-
If you select the XML Tag? check box and leave the Value field null, the gateway uses the name of the root element in the XML message as the value for the corresponding property.
-
if you select the XML Tag? check box and enter a tag name in the Value field, the gateway uses the value for that tag as the value for the corresponding property. If the tag appears multiple times in the XML message, the adapter uses the value of the first occurrence of the tag.
-
If you clear the XML Tag? check box and enter a data value in the Value field, the gateway uses that data as the value for the corresponding property.
The next two options on the Select Action menu deal with Integration control. Please see my other posts on these.
The next option is the Message Tracking. This allows you to track messages track processing actions on the application server. You an then go search these messages to help you debug your publish channel.
Fields:
| FIELD | DESCRIPTION |
| Enable Message Tracking? | This check box turns on/off the message tracking. |
| Store Messages? | This check box turns on/off the storing of those messages. If you turn off the storing of messages, then message will just be written to the log. |
| External Message ID | This is a unique, full XPATH node value that is used to identify the message. |
| Search ID | This is a unique, full XPATH node value that is used by the message tracking search function |
The next option is Generate Schema/View XML. This option will generate the XML Schema for the publish channel and then display the frame of the XML message. When you select this option you will receive a message that states it will generate the Schema for all publish channels. Once you select OK, you will see the XML message:
MIF- Publish Channels
February 20, 2010 in Maximo, Maximo 7, Maximo: MIF by Michael Chrisman 0 Comments
A Publish Channel is an outbound integration interface. A publish channel is bound to one MOS (MIF Object Structure). It allows for special processing for outbound messages.
Let’s look at the fields:
| FIELD | DESCRIPTION |
| Publish Channel | This is a unique name for the publish channel. This name will be part of the message that Maximo generates. |
| Description | This is a description of the publish channel |
| Operation | This is filled in by Maximo and will be ‘Publish’ |
| Processing Class | This is the name of a Java class. This class allows for processing of the outbound message. You can use this class to manipulate the message structure. |
| Event Filter Class | This is the name of a Java class. This class allows you to custom define what the events that will trigger the interface |
| Adapter | This is the name of the adapter then publish channel is part of. The Adapter defines what the base message will look like (XML). Unless you define your own adapter, this will be ‘MAXIMO’. |
| Interface Table | If you are planning on using Interface tables, then you define the name of the table here. |
| XSL Map | This is the name of the XSL map that you can use to transform the output message. This is applied to the final (XML) message that Maximo generates. With XSL, you can transform the XML message to just about any format. |
| User Exit Class | This is the name of the Java Class. This class allows for custom processing message. This is typically used to change the data in the message. |
| User Defined? | This is auto-filled by Maximo. If the interface was created by Maximo, this field will NOT be checked. Any Publish Channel you create (or duplicate), then this will be checked. |
| Retain Mbo’s? | This check box tell the MIF if you want to save the MBO after the XML was created. This allows you to do additional processing to the MOS once the message is generated. |
| Enable Listener? | This field indicates if the Listener is enabled for the Publish Channel. You must enable the listener in order to make the MIF send data. |
The next section is the Object Structure Sub-Records. It list the MBOs that are part of the Object Structure you selected.
The bottom section is for processing rules. Each MBO can have it own set of processing rules. As it turns out, the processing rules have not changed from Maximo 6. As such I refer to those blog posts:
MEA Integration Interface Processing Rules Part 1
MEA Integration Interface Processing Rules Part 2
MEA Integration Interface Processing Rules Examples
Now let’s look at the Select Action Menu.
The first option is the Enable Event Listener. This basically turns on the publish channel so that records will be processed by it. Once you select this option you will receive this message:
Maximo will also check the “Event Enabled?” check box. The next option the Disable Event Listener. This turns off the publish channel. Once you select this option, you will receive this message:
Maximo will also un-check the “Event Enabled?” check box. The next two options are for Integration Controls. I cover these in another post. This functionality is shared with other interfaces types (like Enterprise Services).
The next option is the Message Tracking. This allows you to track messages track processing actions on the application server. You an then go search these messages to help you debug your publish channel.
Fields:
| FIELD | DESCRIPTION |
| Enable Message Tracking? | This check box turns on/off the message tracking. |
| Store Messages? | This check box turns on/off the storing of those messages. If you turn off the storing of messages, then message will just be written to the log. |
| External Message ID | This is a unique, full XPATH node value that is used to identify the message. |
| Search ID | This is a unique, full XPATH node value that is used by the message tracking search function |
The next option is Generate Schema/View XML. This option will generate the XML Schema for the publish channel and then display the frame of the XML message. When you select this option you will receive a message that states it will generate the Schema for all publish channels. Once you select OK, you will see the XML message:
The next two options pertain to Integration controls (Create Integration Controls and Associate Integration Controls). Integration Controls are very powerful and I will cover these in another blog post.
MIF- Integration Controls
February 20, 2010 in Maximo, Maximo 7, Maximo: MIF by Michael Chrisman 0 Comments
Integration controls are a powerful way to either add a semi-hard coded value, a lookup validation list, or a cross reference lookup list to your MIF integrations. Integration Controls are valid for both Publish Channels and Enterprise Services. They are used in Processing Rules. One place where a semi-hard coded value would be of use is if you have multiple instances of Maximo and each system needs a way to identify itself. You could create an Integration control for each instances of Maximo. Then it you can just edit the integration control on each (via the front end) instead of having to create a custom class for each or having to edit the publish channel on each.
You first create the integration control by selecting “Create Integration Controls”:
To edit an existing Integration control, you click on the
icon next to your integration control you want to edit. To create a new one you click on the Add New Control button.
There are four different types of integration controls.
VALUE Control
A value control is where you can set a “hard coded” value.
Fields:
| FIELD | DESCRIPTION |
| Integration Control | This is a unique name for the control. |
| Description | This is a description for the control |
| Domain | You can select a Maximo Domain. If you do, then the Default Value must be in that domain. |
| Default Value | This is the value. |
BOOLEAN Control
A boolean control is where you can set a “hard coded” flag.
Fields:
| FIELD | DESCRIPTION |
| Integration Control | This is a unique name for the control. |
| Description | This is a description for the control |
| Default | Sets the control to True. |
LIST Control
A list control is where you can define a list of valid values for a field.
Fields:
| FIELD | DESCRIPTION |
| Integration Control | This is a unique name for the control. |
| Description | This is a description for the control |
| Domain | You can select a Maximo Domain. If you do, then the Default Value must be in that domain. |
| Default Value | This is the value. |
Cross Reference Control
A cross reference control is where you can create a cross reference list of values. With this, you can have the MIF convert one value to another. This is very useful for when domain values in the External System and Maximo are not the same.
Fields:
| FIELD | DESCRIPTION |
| Integration Control | This is a unique name for the control. |
| Description | This is a description for the control |
| Domain | You can select a Maximo Domain. If you do, then the Default Value must be in that domain. |
| Default Value | This is the Maximo Value. |
| Default External Value | This is the value from the External System. |
Once you have created your Integration Control, you then have to associate it with your Publish Channel or Enterprise Service. You do this by selecting the Associate Integration Control option from the Select Action menu while editing the Publish Channel or Enterprise Service you want to associate them to.
Fields:
| FIELD | DESCRIPTION |
| Integration Control | This is the name of the integration control. |
You can either use the New Row button and add them one at a time or you can use the Select Controls button to select more than one at a time.
Now that you have created and associated your integration controls, you can use them in processing rules.
Creating a Cron Task
February 20, 2010 in Maximo, Maximo 7, Maximo: Programming by Michael Chrisman 0 Comments
Within Maximo, you can create your own custom Cron Task. From an Integration point, you have to create a cron task if your requirements are for batch processing of data. The MEA/MIF are for instant message transfers.
The first step is to create a new class. You will want to extend the SimpleCronTask class. There are two methods that you must override. The first is getParameters(). If your cron task is to have parameters, then must override this method. If you have to parameters, then you can leave this method out.
1: public CrontaskParamInfo[] getParameters() throws MXException, RemoteException
2: {
3: CrontaskParamInfo params[] = new CrontaskParamInfo[5];
4:
5: params[0] = new CrontaskParamInfo();
6: params[0].setName("Param 1");
7: params[1] = new CrontaskParamInfo();
8: params[1].setName("Param 2");
9: params[2] = new CrontaskParamInfo();
10: params[2].setName("Param 3");
11: params[3] = new CrontaskParamInfo();
12: params[3].setName("Param 4");
13: params[4] = new CrontaskParamInfo();
14: params[4].setName("Param 5");
15: params[4].setDefault(MicUtil.getMeaTextDelimiter());
16:
17: return params;
18: }
One VERY important thing is that on line 3, you must dimension the array to the exact number of parameters. Too many or too few will cause the cron task to not work.
The next method you must override is cronAction(). This is where you put the logic to what the cron task is supposed to do.
1: public void cronAction()
2: {
3: try
4: {
5: // Procession Logic
6: }
7: catch(Exception e)
8: {
9: //handel Error
10: }
11:
12: }
You will note that the method does not throw any exceptions. This means you will have to handle all exceptions yourself. There are other methods you might need to look into (like one to see if it is ok to run, etc).
Now compile and place the class in the BusinessObjectsclasses directory structure. Now rebuild/deploy the ear.
Next you have to setup the cron task.
Give your cron task a new name, description and enter the package name/class name. Now click the New Row button. If you get an error here, the 1) check to see if the class is in the location you specified in the class name and two, check the getParameters() method. If you dimensioned the array incorrectly, then you will get an error here. If you don’t get an error, then Maximo will query the getParameters() method to get the list of parameters and display it below.
OK, that is pretty much is. Now you just get to do a lot of testing.
This works for both 6 and 7.
Technorati Tags:
Maximo,
Cron Task,
Java
Maximo 7 Admin Mode
February 20, 2010 in Maximo, Maximo 7, Maximo: Programming by Michael Chrisman 0 Comments
With Maximo 7, you now have to ability to do a Database Configuration from within the application. The first step is setting the application in Admin mode.
Fields:
Number of Administrative Sessions Allowed: this determines how many ‘admins’ can log into Maximo while it is in Admin mode. I do not recommend setting this value to 0. More on this later. A value of 1 to 5 is a good value.
Number of Minutes for user logout: this sets how long users will have to log out. This does not mean they will be forced out of the system however. Admin mode will not start until everyone (not admin) are out of the system. More on this later too.
Update Properties: This saves the values of the above two fields.
Turn Admin Mode On: This starts the process of turning on Admin mode.
Cancel Admin Mode: If admin mode seems to be hanging and you want to stop it, use this button.
Refresh Status: This will refresh the status window.
Close: Closes the dialog window.
Now for a development instance, you might be tempted to just leave it in admin mode and do your work. This is not a good idea. Admin mode turns off all cron jobs and integration. If you are doing such development, you will be frustrated was nothing seems to work. It is always a good idea to turn Admin mode off after you are done with Database Configuration.
Now let’s talk about issues you might run into. First is that admin mode won’t start because it is waiting for user to log out. It is possible to find out who is logged (and to force them out). As it turns out, logged in users are stored in the MAXSESSION table. This statement will show you who is currently logged in:
1: SELECT * FROM MAXSESSION
To force someone out of Maximo, you can delete their entry in this table. BE CAREFUL!!!!!! This will not allow them to save or give them any warning. Also, do NOT delete every entry in this table as you will also kick yourself out of the system.
Sometimes what happens is someone sets the “Number of Administrative Sessions Allowed” to 0 and when everyone logs out, no one can log in. Instead you get this message:
Even if you restart the application server, you will still get this error. At this point the only way to fix it is to change a value in MaxVars and restart the application. Open your favorite SQL tool and run the following:
1: UPDATE MAXVARS
2: SET VARVALUE = 'OFF'
3: where VARNAME = 'ADMINRESTART'
Now restart Maximo application and you should be able to log in. The last step is to set the Number of Administrative Sessions Allowed to something other than 0.
Technorati Tags:
Maximo,
Admin Mode
New Attribute in MaxMessages table
February 20, 2010 in Maximo, Maximo 7, Maximo: Programming by Michael Chrisman 0 Comments
In Maximo 7, IBM has added a new column to MaxMessages table. It is MSGID. This field is required and must be unique. Now you can put any value in here and Maximo will work just fine. However, if you want to use the new Deployment tool with Maximo, then the value of this field matters. The format is 5 characters, 4 digit number and then I, E or W. The 5 characters usually denote the project some way. I am not sure what the I, E or W stands for but my guess is Integration, Error or Windows message.
Technorati Tags:
Maximo,
Maximo 7
Setting Maximo 7 Logging
February 20, 2010 in Maximo, Maximo 7, Maximo: MIF, Maximo: Programming by Michael Chrisman 0 Comments
There have been just enough changes to logging from Maximo 6 to Maximo 7. Most of these changes are nicer as you now manage logging through the front end and you don’t have to restart the application to make your changes active. However, one change is to where log entries are written. In Maximo 6, the were written to the console and to a log file. In Maximo 7, only to the console is enabled by default. That means that if you are running the application as a service, then you could have some issues trying to find the Maximo log info. What you have to do is turn on logging to a file. The first step is to access the logging screen. It is found in GoTo->System Configuration->Platform Configuration->Logging.
Now, we need to specify were we want the file to be written. If you skip this step, then it will be somewhere in the application server directory structure. Now select Select Action->Set Logging Root Folder.
Enter the location that you want the log to be written. I don’t know if it will create the directory for you, so just incase, make sure you create it first.
If, at this point, you applied your changes, you would find that nothing ever would get written there. That is because we have to turn on the file logging appender. To do this, Select Action->Manage Maximo Root Logger.
Next to the Appenders field, there is a little icon. Click on it to bring up the Manage Appenders screen. Now check the box next to Rolling and/or Daily Rolling appenders. (Rolling will create a new file based on file size where Daily Rolling will create a new file each day.).
The last step is to Apply Settings. This will make your changes active and Maximo will now start writing log data to your folder.
Post a Comment