Documentation Center

  • Trial Software
  • Product Updates

Guidelines for Avoiding Unwanted Recursion in a Chart

Recursion can be useful for controlling substate transitions among parallel states at the same level of the chart hierarchy. For example, you can send a directed event broadcast from one parallel state to a sibling parallel state to specify a substate transition. (For details, see Directed Event Broadcasting.) This type of recursive behavior is desirable and efficient.

However, unwanted recursion can also occur during chart execution. To avoid unwanted recursion, follow these guidelines:

 Do not call functions recursively

 Do not use undirected local event broadcasts

Was this topic helpful?