Choice points follow certain calculations to determine on which state to terminate a transition. This decision is made by dynamically evaluating choice point transition guard conditions. The Code View supports selection of Choice Point and Junction Point UML elements, providing an easy way to access and edit the guards of any of the outgoing transitions from the selected pseudo-state.
Choice points are commonly used to decide when to transfer from one state to the next depending on the number of events that have occurred. Choice points can be used to count events; for example, if an online card playing game determines that a card player can only draw cards after receiving five cards from the dealer, the game keeps track of how many cards the player receives, and each time the player receives a card, the system tests whether the player can draw more cards.