Added basic state check to workflow example

Wonder why need of state check is not even mentioned in readme