Maximo Open Forum

 View Only

 Need Help: Maximo to External System Integration with Dynamic Token in POST URL (No Middleware)

  • Architecture
  • Maximo Application Suite
Tanishk Rathi's profile image
Tanishk Rathi posted 05-02-2025 08:44

Hello Community,
 
We want to implement a point-to-point integration between IBM MAS 9 and an external system to send Work Order data.


Integration Requirement:
 
Before each POST request, we must first call a token endpoint to fetch a new token.
 
The retrieved token then needs to be appended to the POST URL before sending the Work Order data.
 
There is no middleware involved in this setup.
 
Looking for suggestions on:
 
1. How can we invoke the token API and capture its response before triggering the actual POST? 
2. What’s the best way to dynamically update the POST URL with the new token? 
3. Any best practices or examples for managing such token-based authentication flows in real time within Maximo?
 
Would appreciate any guidance or references from those who’ve dealt with similar scenarios.
 
Thanks in advance!

Appu nair's profile image
Appu nair

I did this in Java for an integration because it was easier; it would be easy for you to do that with an automation script.

  1. My requirements were like this Maximo needs to construct a SOAP API message to Opentext Content Server, called livelink, in older terminology
  2. Maximo has built-in SOAP Clients almost no code needs to be written.
  3. In my case, each SOAPCall needed to be prefixed with an authentication header this too to a certain extent, you do not need to write code.
  4. In my experience or rather inexperience I found it easier to extend the JAXWS handler and add about 1 or 2 lines of java code so my approach was I would issue a rest call to the OTDS(OpenText Directory Server), retrieve a token and then once I get this I would send the standard SOAP message.

If you are a starter, just try to do some simple examples involving REST using automation scripts, and you will probably get through this in no time.

My flow is like this

  • Publish Channel has my custom Java Handler
  • When an MBO is changed, the Publish Channel sends me a message to the External System configured. Note that an External System is not a middleware; it is just an entity in Maximo that effectively ties your code asynchronously.
  • The External System can be triggered by a JMS queue, so when a change happens in Maximo, depending on your JMSQ setting, the message would reach your destination system.

Coming from other technologies, I found Maximo to be a very mature system, albeit much of the starter code is not readily available or broken IBM links

I looked at Viet Tran Blogs, Bruno Portaluri as well as a whole lot of big brains in the maximo space to deliver my solution.

Edit: I do not know if this happens in your case, but in my case, the XML that Maximo generates has to be changed to what OT expects so XMLTransformation needs to be done so that was again the reason I had to resort to java as the transformation got way too complicated :)

Viet Tran's profile image
Viet Tran

What external system are you looking at? If it supports OAUTH, Maximo now has the OAUTH client which you can use directly in the HTTP Endpoint. 

Below is an example on how to connect Maximo with Microsoft Dynamics.

The OAUTH client automatically refreshes the token when it is expired. 

If you want to use the OAUTH client in your custom code, simply access it as follows:

from psdi.iface.router import OAUTHClient

strToken = OAUTHClient('D365BC').getAccessToken()

If it doesn't use OAUTH and you have to write some custom code to retrieve the token, you can do it by retrieving it with automation script, then invoke the endpoint in the script. You can look at this article as a starting point