These behaviors are always executed as the state is entered or exited. They are typically used to initialize state conditions or variables and to restore them after the state is finished.