Enhanced the state builder to include conditional transitions

The final step to allow conditional transitions is to make the state
builder be able to create conditional transitions.