Tuesday, November 17, 2015

Process JMS Recovery in Maximo



Objective:
Non – persistent data (GL transactions data) that are stuck / lost in JMS queues can be reprocessed using an existing API with Maximo automation script.

Pre-requisites:
1.       Create a folder jmsrecovery inside the Global Integration Directory specified in the System property mxe.int.globaldir
2.       Create a folder for a queue inside the Global Integration Directory. Replace backslash with dots in the folder name.
for example, for outbound sequential queue jms/maximo/int/queues/sqout, the folder name should be jms.maximo.int.queues.sqout

Automation Scripting:
Create an ACTION type script for any MBO object in Maximo.
https://github.com/bysurendar/maximo_processrecoveryapi/blob/master/automationscript_action.py


 

Launch Point of the script:

Input XML:

XMLs are automatically generated when there is an error on the JMS queue.

In case, we plan to resend records manually, then XML need to be created in the below specified format. 

 
XML tag and its values in Maximo application:
i)                     MSGPROP tag attribute values: MEAMessageID -> auto generated value ; destjndiname à same as queue name where the messages are stuck or need to be reprocessed ; interfacetype à External system name; SENDER à MX ; INTERFACE à Publish Channel name
ii)                   MSGDATA tag and its attributes: maximoVersion à Identified from System Help information ;
iii)                  Set and Data tag comprises of Object Structure name


The XMLs are placed in the queue folder inside Integration Global Directory à jmsrecovery à folder with queue name.

 
Write XML to JMS Queue:

The action of writing the XMLs to the queue can be done in 2 ways.
1.       Click on the Execute Script button in the Automation Script application for one time transfer.
2.       Create an escalation for a MBO with 1=1 condition and schedule the resend if required.

In this case, I created the ACTION in COMPANIES object. So, an escalation on COMPANIES object linked with the automation script ACTION can be used for automatic transfer of XML from the folder to the queue.


 

2 comments:

  1. Hi Surendar nice post, but when I execute the script, I have this error :Traceback (most recent call last):
    File "", line 10, in
    Error on line 20: The string "--" is not permitted within comments.

    at psdi.iface.util.XMLUtils.convertBytesToDocument(XMLUtils.java:308)

    at psdi.iface.util.XMLUtils.readXMLFileToDocument(XMLUtils.java:255)

    at psdi.iface.jms.MessageUtil.convertRecoveryDataToJMSData(MessageUtil.java:550)

    at psdi.iface.mic.MicService.processJMSRecovery(MicService.java:828)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

    at java.lang.reflect.Method.invoke(Method.java:611)

    What is it refering to?. I try to get a flatfile from publish channel

    Thanks a lot for your time/comments!.

    Regards

    ReplyDelete
    Replies
    1. Hi Pablo, Could you verify your input XML message ? The error says you have "--" inside the comment tags in your XML.

      Delete