> For the complete documentation index, see [llms.txt](https://giantgrey.gitbook.io/databrain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giantgrey.gitbook.io/databrain/add-ons/logic/finite-state-machine/state-machine-nodes.md).

# State Machine Nodes

### StateMachine Controller

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2F0a6a3C9bLWo80Gbx9l31%2Fstatemachine_controller_node.png?alt=media&amp;token=1bfa28d5-e405-4bf4-a52e-232c47f427d4" alt=""><figcaption></figcaption></figure></div>

Executes the current state. OnEnter, OnUpdate and OnExit calls.\
The FSM Controller always starts with the first (top) state.

### Actions

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FrEijLdFUZsx0QUnJeiMB%2Fstatemachine_actions_node.png?alt=media&amp;token=f6b11f7d-62cb-4752-a61e-9f41bc5ed32f" alt=""><figcaption></figcaption></figure></div>

Executes connected FSM action nodes.

### Action Split

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2F3q1fsvpydkpPV4TPt6f2%2Fstatemachine_actionssplit_node.png?alt=media&amp;token=58d41685-d320-4e6e-8ffb-d567b1a4aab6" alt=""><figcaption></figcaption></figure></div>

Splits a FSM execution into OnEnter, OnUpdate and OnExit. Must be used to execute conventional Logic nodes.

### Switch State

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FhvDmyJ6tpo5k2tu133bv%2Fstatemachine_switch_node.png?alt=media&amp;token=30f5ac08-c703-429d-a3d9-59667bc6cbe3" alt=""><figcaption></figcaption></figure></div>

Switch current state to a new state

### Stop StateMachine

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FLwv1erU272NJ3rYxj7dI%2Fstatemachine_stop_node.png?alt=media&amp;token=9571e141-7ba6-4ab7-ba9f-5901f93b942c" alt=""><figcaption></figcaption></figure></div>

Stops the FSM controller. FSM controller must be called again to be restarted.

### Is State

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2F6DoeFHjSzGrgcFNcERq2%2Fstatemachine_checkstate_node.png?alt=media&amp;token=f2440768-40a3-4dd2-9dc9-6e860da5a56c" alt=""><figcaption></figcaption></figure></div>

Checks if current state is selected state. Executes yes or no.
