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.

Success Scenario

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 FAIL state 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 to FAIL.

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.

Responder Fails Immediately

In this case, the request transitions to ACTIVE and the responder immediately detects a failure before it can transition the response state to ACTIVE. When this occurs, the responder transitions the response state to FAIL.

After detecting that the responder has transitioned its state to FAIL, the requester MUST change its state to FAIL.

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 FAIL to READY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state from FAIL to NOT_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 FAIL to READY. If for some reason the responder is not again prepared to perform a service, it transitions its state from FAIL to NOT_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.

Responder Fails While Providing a Service

When a requester detects a failure of a responder, it transitions it state from ACTIVE 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 FAIL to READY if 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 from FAIL to NOT_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 FAIL to READY if 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 from FAIL to NOT_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.

Requester Fails During a Service Request

When the responder detects that the requester has transitioned its request state to FAIL, the responder also transitions its response state to FAIL.

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 FAIL to READY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state from FAIL to NOT_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 FAIL to READY. If for some reason the responder is not again prepared to perform a service, it transitions its state from FAIL to NOT_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 to READY before the responder can complete its actions. This SHOULD be regarded as a failure of the requester.

Requester Makes Unexpected State Change

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 FAIL to READY. If for some reason the responder is not again prepared to perform a service, it transitions its state from FAIL to NOT_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 to READY after 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 to NOT_READY before completing its actions. This should be regarded as a failure of the responder.

Responder Makes Unexpected State Change

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 FAIL to READY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state from FAIL to NOT_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 as NOT_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 UNAVAILABLE or one of the pieces of equipment does not provide a heartbeat within the desired amount of time (See Fundamentals for details on heartbeat).

Requester - Responder Communication Failure 1

Requester - Responder Communication Failure 2

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 FAIL state, 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 FAIL to READY. If for some reason the requester cannot return to a condition where it is again ready to request a service, it transitions its state from FAIL to NOT_READY.

The responder, as part of clearing its FAIL state, 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 FAIL to READY. If for some reason the responder is not again prepared to perform a service, it transitions its state from FAIL to NOT_READY.

Source: MTConnect Institute model documentation, version 2.8.

MTConnect term dictionary ยท TAMS Model-Aware MTConnect Browser

An unhandled error has occurred. Reload ๐Ÿ—™