How do we have change status functionality get triggered and record status history when sending inbound transaction with new status than the current one on record ?
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 : 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.
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.
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.
Usage
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.
Reference : IBM Technote MIF Changing status with an inbound transaction
No comments:
Post a Comment