# State

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.State/

One state in a workflow.

- **Full name:** `MFiles.State`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-id"></a>`id` | `int32` | 1 | State ID. |
| <a id="f-name"></a>`name` | `string` | 2 | The name of the state. |
| <a id="f-description"></a>`description` | `string` | 3 | The description of the state. |
| <a id="f-options"></a>`options` | [`ACTIONFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ACTIONFLAGS/index.md) | 4 | Flags that tell which actions are enabled for this state. |
| <a id="f-action_set_acl"></a>`action_set_acl` | [`ActionSetACL`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ActionSetACL/index.md) | 5 | The properties of the Set Permissions action. |
| <a id="f-action_assign_to_user"></a>`action_assign_to_user` | [`ActionSetAssignment`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ActionSetAssignment/index.md) | 6 | The properties of the Assign to User action. |
| <a id="f-actions"></a>`actions` | repeated [`ActionSetAssignment`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ActionSetAssignment/index.md) | 7 | Action array. |
| <a id="f-action_send_notification"></a>`action_send_notification` | [`ActionSendNotification`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ActionSendNotification/index.md) | 8 | The properties of the Send Notification action. |
| <a id="f-action_set_properties"></a>`action_set_properties` | [`ActionSetProperties`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ActionSetProperties/index.md) | 9 | Action: set properties. |
| <a id="f-action_convert_to_pdf"></a>`action_convert_to_pdf` | [`ActionConvertToPDF`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ActionConvertToPDF/index.md) | 10 | Action: convert to PDF. |
| <a id="f-action_code"></a>`action_code` | `string` | 11 | Action: run VBScript code. |
| <a id="f-restrict_transitions"></a>`restrict_transitions` | `bool` | 12 | True if transitions involving this state must be individually allowed. |
| <a id="f-transitions_require_edit_access_to_object"></a>`transitions_require_edit_access_to_object` | `bool` | 13 | True if state transitions require edit access to the object. |
| <a id="f-check_in_out_acl"></a>`check_in_out_acl` | `bool` | 14 | True if the in/out permissions of this state should be checked. |
| <a id="f-in_out_acl"></a>`in_out_acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | 15 | The in/out permissions of this state. |
| <a id="f-preconditions"></a>`preconditions` | [`StateConditions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.StateConditions/index.md) | 16 | State preconditions. (rules) |
| <a id="f-postconditions"></a>`postconditions` | [`StateConditions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.StateConditions/index.md) | 17 | State postconditions. (rules) |
| <a id="f-aliases"></a>`aliases` | `string` | 18 | Semicolon-separated list of semantic aliases. |
| <a id="f-user_description"></a>`user_description` | `string` | 19 | The user description of the state. |
| <a id="f-state_flags"></a>`state_flags` | [`STATEFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.STATEFLAGS/index.md) | 20 | Flags that tell different options set for this state. |
| <a id="f-agent_action_guid"></a>`agent_action_guid` | `string` | 21 | The agent action GUID of the state, or GUID_NULL if not set. |

<a id="used-in-fields"></a>

## Used in fields

- [`StateDecl.state`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.StateDecl/index.md#f-state): The workflow state. The name of the state is in `base_info`, and its description in the per-language `base_info.translations`.
- [`WorkflowAdmin.states`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WorkflowAdmin/index.md#f-states): The states of this workflow.
