Some state transitions are determined by matching regular expressions with text supplied by consumers. Other states have specific transitions that define follow-up states, which state developers define in the code.
The OK and Fail transitions do not use pattern matching; such transitions are based on states' code, and validation provided by, or events in, back-end systems. Some states do not require OK or Fail transitions. If a state does require one of these transitions, and you do not specify a follow-up state, the application terminates.
For dynamic transitions, a state's code has the option to return an expression, which provides the input to the pattern-matching mechanism. Dynamic transitions also provide a way to transition to success or failure outcomes, and may replace the OK and Fail transitions. Dynamic transitions can communicate information back to applications about certain validation problems.
This example includes an OK transition, a Fail transition, and a dynamic transition that uses the expression MIN|MAX.