> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document state changed

> Track changes in document state flags such as Recognized, Verified, and Exported with the Document state changed event in FlexiCapture scripts.

## What it does

At any moment the document state can be described with an array of flags. The event occurs every time when the state changes. A set of flags describing changes in the document state are passed to the event as input parameters.

## Flags that determine the document state

* Preprocessed
* Analyzed
* Recognized
* HasErrors
* Assembled
* Verified
* Exported
* HasLayout

## When it is launched

The script is launched on document export provided the document state has changed since it was read.

## Parameters

| **Name**      | **Type**                                                                                                                                      | **Access** | **Description**                                        |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------ |
| ChangedStates | [IScriptBinaryAttributes](/flexi-capture/appendix/scripts/iscriptbinaryattributes)\<[TStateType](/flexi-capture/appendix/scripts/tstatetype)> | Read-only  | Stores information about changes of the document state |
| Document      | [IDocument](/flexi-capture/appendix/scripts/idocument)                                                                                        | Read/write | The document                                           |
