Question & Answer
How do I get the Integration Framework or MEA to change the status of a record in Maximo?
Status change is an operation that is performed on stateful Maximo Business Objects. For example, a Person object can be changed from ACTIVE to INACTIVE and back by means of a button or menu selection in the application screen.
In order to perform a status change with an inbound Integration Framework transaction, you must include the STATUSIFACE and NP_STATUSMEMO attributes in addition to the STATUS attribute with the new value, and use the StatefulMicSetIn processing class. (Integrations that are provided with Maximo already use this class or have an integration-specific processing class which is an extension of StatefulMicSetIn.)
Note that the STATUS and STATUSDATE fields should be restricted in the object structure. Verify this in the Inbound Setting Restrictions in the Object Structures application.
STATUSIFACE is a boolean attribute which specifies how the transaction should be processed with regards to status changes:
STATUSIFACE=0 - This transaction will perform the specified Action (Add or Replace for example) on the data, save it, and then, if the new status is different from the existing status, perform a status change operation. Note that an invalid status change, such as attempting to cancel a closed workorder, will cause an error.
STATUSIFACE=1 - This transaction is ONLY a status change. Any data other than the key attributes which identify the record are ignored. If the new status is different than the existing status, perform a status change operation.
STATUSIFACE not present or has a null value - (versions 6.x and 7.1 only) This transaction will perform the specified Action (Add or Replace for example) on the data. The status will be set to the value in the inbound transaction without performing any related status change processing, such as inserting a record into WOSTATUS for a workorder status change. This is not recommended in versions 6.x or 7.1. In version 7.5 and higher, not present or null value are treated as STATUSIFACE=0.
The NP_STATUSMEMO attribute is used for the memo or remark which accompanies the status change. For example, if changing a workorder status, the value of NP_STATUSMEMO will be placed in the MEMO field of the WOSTATUS record that is inserted by the status change.
For Maximo version 6, the STATUSIFACE and NP_STATUSMEMO attributes are defined as user added attributes in the Object Structure. For Maximo 7 these are defined as nonpersistent attributes of the object in Database Configuration.
If you create a custom Object Structure for a stateful Maximo object, you must also add STATUSIFACE (and NP_STATUSMEMO if the status has a remarks or memo component in the status change dialog on the screen) to the Object Structure by adding it as a nonpersistent attribute to the main object in Database configuration. If you are running Maximo 6, you can still add it in this fashion.
You must also specify psdi.iface.mic.StatefulMicSetIn as the processing class in the object structure definition. If you are creating a custom processing class, then it must extend the StatefulMicSetIn class.
In most cases you will only need to specify a STATUSIFACE of 0. This will ensure that the integration action is carried out and that the status will be changed if the new status is different.
If you plan on sending in transactions that will only change a status, such as approving a workorder or deactivating a person, then you can use the same integration that you use for data updates with status changes, but set STATUSIFACE to 1 and only send the key attribute values which identify the record, such as WONUM and SITEID for a workorder, along with the new status value.
13 April 2021