Original Message:
Sent: Tue May 06, 2025 03:08 AM
From: Andrzej Więcław
Subject: Maximo to External System Integration with Dynamic Token in POST URL (No Middleware)
Hi Tanishk,
AD #1 & #2
in order to inject different kinds of customizations into outbound processing at the actual message delivery stage you typically use End Point with Maximo standard HTTP
handler and its HTTPEXIT
property, pointing to a class (implementing psdi.iface.router.HTTPExit
interface) or use Endpoint script (note the spelling difference) capabilities - more specifically HTTP Handler Exit.
Focusing on the latter, you most likely need to run additional HTTP request(s) to get the API token and use it as a request header. It can be done by implementing this logic in headerProps(req)
function of your automation script. You can use whole spectrum of available automation scripting capabilities to make those HTTP calls (out of the scope of this reply). Finally you register the automation script itself in the HTTP Handler's HTTPEXIT
property as script:{script name}
, instead of Java FQCN.
AD #3
When it comes to best practices then I believe it's the best to refer how Maximo implements OAuth 2.0 support (ref. @Surender Balasundaram Maximo Manage MAS HTTP End Point with OAuth Configuration article).
AD #4
As you noticed in general it's fully supported in Maximo use case to acquire additional details in order to successfully send an integration message using non-static delivery details. You need to be however fully aware of potential consequences in both Maximo and external system of the additional actions you're going to implement. For simple deployments (not too frequent messaging) it may be good enough to acquire new token every time, every single message is going to be sent out, but for higher volumes of messages or in case of any authentication endpoint request limits in your external system, you may need to implement API token caching mechanism which will allow you to reuse API token throughout several requests. In such case of course you need to take into account other aspects as: where to store it, for how long it can be reused, how/when it should be refreshed, etc. I think it's best to have a look at Maximo standard psdi.iface.router.OAUTHClient
implementation while seeking for inspiration how to do that.
------------------------------
If this post helps, please consider accepting it as a solution to help other members find it more quickly.
Andrzej Więcław
Maximo Technical SME
ZNAPZ B.V.
Wrocław, Poland
Original Message:
Sent: Fri May 02, 2025 09:15 AM
From: Tanishk Rathi
Subject: Maximo to External System Integration with Dynamic Token in POST URL (No Middleware)
Hello Maximo Experts,
We have a requirement to have 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?
4. Pros & Cons
Would appreciate any guidance or references from those who've dealt with similar scenarios.
Thanks in advance!
------------------------------
Tanishk Rathi
------------------------------