This entry is part of the Maximo Integration Framework series.
In standard Maximo/TPAE there is no way to schedule the invocation of an outbound interface in order to periodically export a CSV or XML file at a specific interval. This can be accomplished with a little custom Java class. I have used the Java code described in this post as a starting point to develop my own generic procedure. In this example I will show how periodically export in a CSV file all the assets that contains the word ‘pump’ in the description. The procedure can be adapted to periodically invoke any Publish Channel you like.
Java CronTask setup
First of all you need to compile the Java class that implements the custom crontask. If you are not a Java guru, don’t worry. Here is the class file already compiled for you. To deploy it on your Maximo server you must copy the RunPublishChannelCrontask.class to SMP\maximo\applications\maximo\businessobjects\classes\custom\integration\cron directory, rebuild and redeploy the Maximo EAR file. Restart the application server and login as maxadmin on Maximo UI.
Create an Integration Object Structure MYASSET and add the ASSET object as source.
Remember to select ‘Support Flat Structure’ if you need CSV export.
Now create the Publish Channel MYASSETS.
Create an External System (or reuse your own) and add the MYASSETS Publish Channel to it.
Enable publish channel and test that everything is ok using the ‘Data Export’ button. A CSV file should appear in few minutes in your MIF output folder (see mxe.int.globaldir system property). If you have problems check the JMS queues, JMSQSEQCONSUMER crontask and anything that may block the publish channel functionality.
Cron Task Configuration
If everything is ok it’s now time to schedule the invocation of the Publish Channel. Go to System Configuration – Platform Configuration – Cron Task Setup and create the crontask instance setting custom.integration.cron.RunPublishChannelCrontask in the Class field.
Activate and reload the crontask instance with the Action – Reload Request command.
You should now see a new CSV file published every 2 minutes in the MIF output folder.