This topic explains how to create a guard condition for a transition.
OCL support overview (OCL expression)
UML 2.0 State Machine diagrams