Some activities such as SAP.ReadStatusbar activity do not follow the Timeout property if the SAP session has hung or has been disconnected. It will keep running forever until the user manually kills SAP.
With this snippet, you can enforce a timeout by having a separate timeout handler that runs independent of your main flow, meaning it will not get affected by events such as SAP being busy/hung. If the timeout does occur you can let the robot perform actions such as kill SAP etc, which will solve the above problem.
Prevents your RPA process from getting stuck for a very long time due to application hanging.