Max Seo
Max Seo

Reputation: 216

IBM Maximo - Is there a way to get possible work order status transitions via API

We are building a work order management integration layer on top of the base Maximo, communicating via provided REST/OSLC API, but we are stuck when it comes to finding all possible statuses a work order could transition to for a given work order.

Is there a REST/OSLC API, or some way to expose it externally (ex. some kind of one-time config export), the possible status transitions for a given work order?

This should consider all the customizations we've made to Maximo including additional statuses, extra conditions, etc. We are targeting version 7.6.1.

Upvotes: 3

Views: 1559

Answers (2)

Dex
Dex

Reputation: 1271

IBM seems to have dropped some things from the new NextGen REST/JSON API documentation. There is almost no mention of the "getlist" action anymore, something I have really enjoyed using for domain controlled fields. This should give you exactly what you are looking for, a list of the possible statuses that a given work order could go into. I was unable to verify this call today, but I remember it working as desired when I last used it (many months ago).

<hostname>/maximo/oslc/os/mxwo/<href_value_of_a_specific_wo>?action=getlist&attribute=status

Upvotes: 5

JPTremblay
JPTremblay

Reputation: 900

The method you're looking for is psdi.mbo.StatefulMbo.getValidStatusList

See details here: https://developer.ibm.com/assetmanagement/7609-maximo-javadoc/

Now, you want to expose the result to a REST API. You could create an automation script that given the WONUM would return the allowed status list. You can leverage the new REST API to achieve that quite easily.

See how you can call an automation script with a REST call here: https://developer.ibm.com/static/site-id/155/maximodev/restguide/Maximo_Nextgen_REST_API.html#_automation_scripts

Last part: you will need to create a request response based on the mboset returned from getValidStatusList.

Upvotes: 3

Related Questions