- Maximo use JMS queues for inbound, outbound data processing. These messages and message count can be manually viewed from External System application.
- Here is a simple automation script to get the count of Messages in JMS Queues. It can be used in Action Launch point to view message count in 'Action button' of an application OR in an Escalation to send details via Email.
Script:
from psdi.iface.jms import JMSQueueBrowser
from psdi.iface.jms import MaxQueueCache
from psdi.iface.jms import QueueConfig
from psdi.iface.jms import JMSData
qbrowser = None
queueName = "jms/maximo/int/queues/cqin"
selector = "SENDER='ABC'"
config = MaxQueueCache.getInstance().getQueueConfig(queueName);
connectionFactory = config.getConfactName();
env = config.getEnv()
qbrowser = JMSQueueBrowser(queueName, connectionFactory, selector, env);
qList = qbrowser.getAllMessages();
qCount=len(qList)
#raise TypeError("Messages Count - "+str(qCount))
print '-- Number of Messages in the Queue : ' +str(qCount)
Script Variables:
queueName = path of the JMS queue as configured in Maximo
selector = condition to filter the Queue Messages (https://www.ibm.com/docs/en/cdfsp/7.6.1.x?topic=configuration-viewing-deleting-messages-in-jms-queue)
No comments:
Post a Comment