Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Issue populating Federated MBO via REST call

    Posted Fri March 18, 2022 07:22 PM
    I'm trying to provide external data to a Maximo Mobile data source via the Federated MBO object type and Object Structure features.  The external data source requires a token that must be retrieved by a call to an authentication API.  I've tried writing a custom HTTP handler to add the required header, but it appears that Maximo doesn't allow this option. The new End Point is successful when tested, but I always get an error of "<custom handler> incompatible with psdi.iface.router.HTTPHandler" when I try to access the Federated MBO via an Object Structure call. The signature for my custom handler is identical and provides all the same methods and properties of the stock HTTP handler.  Is there a way to modify the header of the End Point using an automation script or  custom Java code elsewhere?

    For reference, I'm doing something similar to what is found in this post to create my custom handler.
    Maximo Integration and custom endpoint for token retrieval -

    ------------------------------
    Donovan Smith
    ------------------------------



    #Maximo
    #AssetandFacilitiesManagement
    #MaximoIntegrationandScripting


  • 2.  RE: Issue populating Federated MBO via REST call

    Posted Mon March 21, 2022 10:08 AM
    Does your class extend psdi.iface.router.HTTPHandler? Based on what you're doing it should be extending the HTTPHandler and then it should work. That's how we support Cloudant for example. 

    Regarding automation script, you can create a custom script handler but it does not extend the HTTPHandler so you'd have the same issue. You could update the properties on the endpoint via a script but be aware this is cached so you would have to reload the cache for it to take effect. I'd probably stick with your approach. 

    Just as a FYI, we added OAuth 2.0 support in MAS 8.7 and plan to add it in the 7.6.1.3 release as well. I know that doesn't help you today but hopefully you won't need it too much longer (assuming your integration is OAuth 2.0)

    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: Issue populating Federated MBO via REST call

    Posted Mon March 21, 2022 12:08 PM
    Steven,

    Thanks for the quick response.  This makes sense.  I should have extended HTTPHandler instead of BaseHandler for my custom handler class.  I'll give that a try to see if it resolves my error. 
    I took a look at the Cloudant JSON Resource example and it is implemented using the HTTP handler, but a custom resource type with analyzer and processing classes supplied.  Does that address a different requirement to decode the JSON response?
    -Donovan

    ------------------------------
    Donovan Smith
    ------------------------------



  • 4.  RE: Issue populating Federated MBO via REST call

    Posted Mon March 21, 2022 12:28 PM
    The resource type impacts how we process the response as you mentioned. We may have changed it at some point (it might have previously used the HTTP Handler) but at least in my 7.6.1.2 environment we have a special handler (IOTCLOUDANT) on the IOTHISTCLOUD endpoint. That new handler extends the HTTPHandler.

    ------------------------------
    Steven Shull
    ------------------------------



  • 5.  RE: Issue populating Federated MBO via REST call

    Posted Tue March 29, 2022 05:17 PM

    Steven,

    Thanks for the great tip.  I was able to get my Federated MBO working by extending the HTTP Handler.  Is it possible to capture the user making the REST call?  The external data might be changed based on the user making the request.

    Thanks,

    Donovan



    ------------------------------
    Donovan Smith
    ------------------------------