Rabu, 09 Juli 2014

Flat CSV file export with Maximo Integration Framework

This entry is part of the Maximo Integration Framework series.

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
For more details about how the MIF works look at the Maximo Integration Framework overview.

If this is the first time you are using the Maximo Integration Framework, you should check that your MIF is properly set up before going ahead.


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


    If the file does not appear in one or two minutes please verify your Maximo Integration Framework configuration.


    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.
    You may also try to import data in Maximo database or look at other articles about Maximo Integration Framework.

    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.



    Source:http://maximodev.blogspot.com/2013/04/flat-csv-file-export-maximo-integration-framework.html

    Tidak ada komentar:

    Posting Komentar