Tutorials : UML modeling for information system architecture : Module 4: Create state diagrams : Lesson 4.2: Determine the states and transitions for a class
  
Lesson 4.2: Determine the states and transitions for a class
Determine the states and transitions for a class for the sequence diagram Make Reservation.
As a general rule, you can look at event lines entering objects of a class on a Sequence diagram to find Transitions for your State diagram. Likewise, you can study the outgoing event lines to find actions that the class performs while in a particular State.
Take another look at the Sequence diagram you built named Make Reservation.
Note the messages on the Sequence diagram that enter the object Reservation. These messages, such as Create Reservation and Update Status to Reserved, cause transitions that cause the Reservation to move from one state to another (from the state of being Provisionally Created to the state of being Reserved). If you continued to add details to this Sequence diagram, you might add event lines corresponding to the Customer confirming the reservation, which would put Reservation into the state of being Confirmed. On another Sequence diagram, you might model the scenario for the customer canceling the reservation, transitioning Reservation into the state of being Cancelled. On yet another Sequence diagram, you might model the scenario for the customer's credit not being okay, in which case the Reservation is Denied. You should look at all of the Sequence diagrams on which objects of a class are modeled when trying to capture the behavior of a class in a state diagram.
Sometimes it is not clear from the Sequence diagram that an action is performed while a class is in a particular State. With the State diagram, you can discover and capture actions not included in the Sequence diagram.