MTConnect 2.8 package
Operation and Error Recovery
The request and response state model implemented for interfaces may also be represented by a graphical model. The scenario in Success Scenario demonstrates the state transitions that occur during a successful request for service and the resulting response to fulfill that service request.

Packages
- Request and Response Failure Handling and Recovery
A significant feature of the request and response interaction model is the ability for either piece of equipment to detect a failure associated with either the request or response actions. When either a failure or unexpected action occurs, the request and the response portion of the interaction model can announce a
FAILstate upon detecting a problem. The following are graphical models describing multiple scenarios where either the requester or responder detects and reacts to a failure. In these examples, either the requester or responder announces the detection of a failure by setting either the request or the response state toFAIL.Once a failure is detected, the interaction model provides information from each piece of equipment as they attempt to recover from a failure, reset all of their functions associated with the interface to their original state, and return to normal operation.
The following sections are scenarios that describe how pieces of equipment may react to different types of failures and how they indicate when they are again ready to request a service or respond to a request for service after recovering from those failures:
Responder Fails Immediately
In this scenario, a failure is detected by the responder immediately after a request for service has been initiated by the requester.

In this case, the request transitions to
ACTIVEand the responder immediately detects a failure before it can transition the response state toACTIVE. When this occurs, the responder transitions the response state toFAIL.After detecting that the responder has transitioned its state to
FAIL, the requester MUST change its state toFAIL.The requester, as part of clearing a failure, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to request a service. If the recovery is successful, the requester changes its state from
FAILtoREADY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state fromFAILtoNOT_READY.The responder, as part of clearing a failure, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to perform a service. If the recovery is successful, the responder changes its response state from
FAILtoREADY. If for some reason the responder is not again prepared to perform a service, it transitions its state fromFAILtoNOT_READY.Responder Fails While Providing a Service
This is the most common failure scenario. In this case, the responder will begin the actions required to provide a service. During these actions, the responder detects a failure and transitions its response state to
FAIL.
When a requester detects a failure of a responder, it transitions it state from
ACTIVEtoFAIL.The requester resets any partial actions that were initiated and attempts to return to a condition where it is again ready to request a service. If the recovery is successful, the requester changes its state from
FAILtoREADYif the failure has been cleared and it is again prepared to request another service. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state fromFAILtoNOT_READY.The responder, as part of clearing a failure, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to perform a service. If the recovery is successful, the responder changes its response state from
FAILtoREADYif it is again prepared to perform a service. If for some reason the responder is not again prepared to perform a service, it transitions its state fromFAILtoNOT_READY.Requester Failure During a Service Request
In this scenario, the responder will begin the actions required to provide a service. During these actions, the requester detects a failure and transitions its request state to
FAIL.
When the responder detects that the requester has transitioned its request state to
FAIL, the responder also transitions its response state toFAIL.The requester, as part of clearing a failure, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to request a service. If the recovery is successful, the requester changes its state from
FAILtoREADY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state fromFAILtoNOT_READY.The responder, as part of clearing a failure, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to perform a service. If the recovery is successful, the responder changes its response state from
FAILtoREADY. If for some reason the responder is not again prepared to perform a service, it transitions its state fromFAILtoNOT_READY.Requester Changes to an Unexpected State While Responder is Providing a Service
In some cases, a requester may transition to an unexpected state after it has initiated a request for service.
As demonstrated in Requester Makes Unexpected State Change, the requester has initiated a request for service and its request state has been changed to
ACTIVE. The responder begins the actions required to provide the service. During these actions, the requester transitions its request state back toREADYbefore the responder can complete its actions. This SHOULD be regarded as a failure of the requester.
In this case, the responder reacts to this change of state of the requester in the same way as though the requester had transitioned its request state to
FAIL(i.e., the same as in Scenario 3 above).At this point, the responder then transitions its response state to
FAIL.The responder resets any partial actions that were initiated and attempts to return to its original condition where it is again ready to perform a service. If the recovery is successful, the responder changes its response state from
FAILtoREADY. If for some reason the responder is not again prepared to perform a service, it transitions its state fromFAILtoNOT_READY.Note: The same scenario exists if the requester transitions its request state to
NOT_READY. However, in this case, the requester then transitions its request state toREADYafter it resets all of its functions back to a condition where it is again prepared to make a request for service.Responder Changes to an Unexpected State While Providing a Service
Similar to Scenario 5, a responder may transition to an unexpected state while providing a service.
As demonstrated in Responder Makes Unexpected State Change, the responder is performing the actions to provide a service and the response state is
ACTIVE. During these actions, the responder transitions its state toNOT_READYbefore completing its actions. This should be regarded as a failure of the responder.
Upon detecting an unexpected state change of the responder, the requester transitions its state to
FAIL.The requester resets any partial actions that were initiated and attempts to return to a condition where it is again ready to request a service. If the recovery is successful, the requester changes its state from
FAILtoREADY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state fromFAILtoNOT_READY.Since the responder has failed to an invalid state, the condition of the responder is unknown. Where possible, the responder should try to reset to an initial state.
The responder, as part of clearing the cause for the change to the unexpected state, should attempt to reset any partial actions that were initiated and then return to a condition where it is again ready to perform a service. If the recovery is successful, the responder changes its response state from the unexpected state to
READY. If for some reason the responder is not again prepared to perform a service, it maintains its state asNOT_READY.Responder or Requester Become UNAVAILABLE or Experience a Loss of Communication
In this scenario, a failure occurs in the communications connection between the responder and requester. This failure may result from the InterfaceState from either piece of equipment returning a value of
UNAVAILABLEor one of the pieces of equipment does not provide a heartbeat within the desired amount of time (See Fundamentals for details on heartbeat).

When one of these situations occurs, each piece of equipment assumes that there has been a failure of the other piece of equipment.
When normal communications are re-established, neither piece of equipment should assume that the request and response state of the other piece of equipment remains valid. Both pieces of equipment should set their state to
FAIL.The requester, as part of clearing its
FAILstate, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to request a service. If the recovery is successful, the requester changes its state fromFAILtoREADY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state fromFAILtoNOT_READY.The responder, as part of clearing its
FAILstate, resets any partial actions that were initiated and attempts to return to a condition where it is again ready to perform a service. If the recovery is successful, the responder changes its response state fromFAILtoREADY. If for some reason the responder is not again prepared to perform a service, it transitions its state fromFAILtoNOT_READY.
Source: MTConnect Institute model documentation, version 2.8.
MTConnect term dictionary ยท TAMS Model-Aware MTConnect Browser