Problem is state checking and transitioning makes sense in a synchronous flow, but here…