Updated samples to include state and transition declaration