To specify the behavior of the interface, first define and initialize two variables:

Next define the state machine of the IUser interface according to the following description:

See the notes and example about a reply in transitions.

It is not possible to use local variables in a transition, but note that it is allowed to have statements after a reply.