Tuesday, April 30, 2024

Maximo Mock Service for Integrations based on JMS

A Java Based Mock Service for JMS integration in Maximo.

Mock Services are used to simulate the client calls, receives requests or returns responses for Integrations in environments other than production. It's used to create testing scenarios before the implementation of actual Interface, regression testing, cost effective availability of integration for non-production environments and create client demos.

A sample java project gitlab-suren-jmsmockservice to mock a PR Interface response from a system. 





The utility is started as a service in the endpoint server from a command line from the com.custom.mockrunner.Driver class with Command line arguments. 


The Command Line must pass these Environment, Interface (or Service) and resource file path as arguments to establish connection to a JMS Bus, Interface to identify the response template and resource path to location of properties and response template folder. 


-e Environment argument denotes the system to which the tool needs to establish connection. It must match with the properties file (local, test etc.,) which has the JMS Connection properties like SIBus (Service Integration Bus) Provider URL, JNDI Factory and JMS Binding Names. It also has queue names of the JMS for reading the messages.

-s Service argument specifies the Interface name used in the MockFactory class to instance the particular JMSMock Class. 

-f Resource Path folder location where connection details and template files are placed.