Wednesday, 11 December 2013

Maximo Integration Framework (MIF)

What is Maximo Integration Framework?

The Maximo Integration Framework (MIF) is an integral part of the Tivoli Process Automation Engine (TPAE) that allows the synchronization and integration of data and of applications between TPAE and external systems in real time or batch mode by using a variety of communication protocols.


Main Concepts

The three main concepts of MIF are:
  • Object Structures are collection of Business Objects and relationships that define the content of messages for Channels and Services.
  • Services receive data into the system
  • Channels send data out of the system

This picture gives an overview of the MIF architecture and of the available services (depicted in green) and channels (depicted in yellow).



Services

The simplest service is the Object Structure Service. It allows to create, update, delete and query data in TPAE's database.


Enterprise Services are more powerful allowing to process data synchronously or asynchronously (using a JMS queue) and have data processing layers that can transform data. Enterprise Services can use multiple protocols such as Web Services, HTTP, database tables, XML and flat files.


The enterprise service can use the following processing layers:
  • Processing Rules – The integration framework provides a rule engine where you can filter and transform the XML message.
  • XSL Map – Represents an XSLT style sheet that you can use to transform data and perform mapping of the XML message to another format.
  • User Exit and Processing Classes – Represents Java classes that you can use to filter, transform data, and implement business logic.

Channels

There are two main types of outbound services (channels).
  • The Publish Channel is asynchronous and can be triggered by a completed transaction on a primary object with an enabled event listener or by a data export.
  • The Invocation Channel in synchronous and can be triggered by an action class called by a user interface control (within an application), a workflow or an escalation.

Both services provides processing rules, XSL map and user/processing classes to transform data.




Maximo Integration Framework first setup


If you have never used the Maximo Integration Framework you have to check the MIF configuration before being able to play with it.

System Properties

All the configuration parameters for MIF can be managed from the System Properties  application: GoTo -> System Configuration -> Platform Configuration -> System Properties. -> mxe.int.*

The most important property to check is mxe.int.globaldir. This property specifies the root folder where all the integration configuration files are located. If this value is null, the folders are created under the directory from which the application server is started, or from the current working directory of the application server (e.g. C:\IBM\WebSphere\AppServer\profiles\AppSrv01).

Other important properties that need to be set before using MIF are:
  • mxe.int.webappurl: This specifies the integration Web application URL. The syntax is http://[HOST]:[PORT]/meaweb/maximo.
  • mxe.int.admintoemail: Email address to which the integration framework sends notification of message processing errors.

JMS Queue Setup

Java Message Service (JMS) is used for routing messages from the processing layers to the external systems.
To verify that the JMS Queues are correctly installed login to the WebSphere Integrated Solutions Console and go to Resources - JMS - Queues. Ensure the following queues are enabled:
  • cqin : Continuous Inbound Queue
  • sqin : Sequential Inbound Queue
  • sqout : Sequential Outbound Queue

CRON Tasks

There are several CRON tasks that must be active. Go to System Configuration - Platform Configuration - Cron Task Setup and ensure that the following Cron Tasks are enabled:
  • JMSQSEQCONSUMERThis cron task pulls records from JMS Queues for processing.
  • IFACETABLECONSUMER to regularly poll the interface tables
  • FLATFILECONSUMER to use flat files for inbound data import
  • XMLFILECONSUMER to use XML file for inbound data import

Flat CSV file export with Maximo Integration Framework

In this tutorial I will show how to configure the Maximo Integration Framework in order to export data from Maximo into a Comma Separated Values (CSV) text file.

To achieve such goal we must configure the following chain:
  1. Object Structure
  2. Publish Service
  3. External System
Object Structure

Open Integration > Object Structure application and create a new entry.
  • Object Structure: D-PERSON
  • Description: Demo Person Object Structure
  • Consumed By: INTEGRATION
  • Support Flat Structure: True
  • Source Objects: PERSON



Remove unwanted attributes from the Object Structure. This will simplify the structure of the output file and will greatly improve performances of the import/export process.
Select the Include/Exclude Fields menu and check all the Exclude check-boxes except the following:
  • PERSONID
  • FIRSTNAME
  • LASTNAME
  • DISPLAYNAME

Publish Channel

Go to Integration > Publish Channels application and create the following entry.
  • Publish Channel: D-PERSON
  • Description:Demo Publish Channel for Person data
  • Operation: Publish
  • Object Structure: D-PERSON




External System

Go to Integration > External Systems application and create the following entry.
  • System: D-EXTSYS
  • Description: Demo External System
  • End Point: MXFLATFILE
  • Enabled: True
  • Outbound Sequential Queue: jms/maximo/int/queues/sqout
  • Inbound Sequential Queue: jms/maximo/int/queues/sqin
  • Inbound Continuous Queue: jms/maximo/int/queues/cqin



Go in the Publish Channel tab and insert the D-PERSON channel created previously.

Don't forget to enable the Publish Channel and to save the External System.


Export data

To export the data stored in the Maximo PERSON table just click on the Data Export button. A dialog box will be displayed allowing you to enter an SQL where clause to filter to exported rows.
For simplicity just put a small number in the Export Count field to limit the number of exported rows.

Click on the OK button and your CSV file will be exported in a directory named flatfiles under the path specified in mxe.int.globaldir system property. In my environment the directory is D:\MIF\flatfiles. Here is how the output file should look like.
D-EXTSYS,D-PERSON,,EN
DISPLAYNAME,FIRSTNAME,LASTNAME,PERSONID
Tom Revis,Tom,Revis,REVIS
Fred Stanley,Frederick,Stanley,STANLEY
Keith Mills,Keith,Mills,MILLS
Mark Jacoby,Mark,Jacoby,JACOBY
Bob Pillance,Bob,Pilla,BPILLA


Final considerations

Now you can include more attributes to your objects using the Include/Exclude Fields action of the Object Structure application or you can create your own object structure.

This is just the beginning of your journey in the MIF. Keep in mind that MIF is a powerful tool that allows to do many things.
Just to play a little bit let's do one last trick.
Go to Publish Channels application, open the D-PERSON object and select Enable Event Listener.
Now go in Administration > Resources > People and create a new person record. If you look in your MIF directory on the Maximo server and you should see that a new CSV file has been automatically created with the new person data.


No comments:

Post a Comment