> ## 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.

# ImportFromFlexiCaptureExample

> Walk through the ImportFromFlexiCaptureExample sample task, which runs the Import logic to fetch processed batch results and report the Document Definition.

The **ImportFromFlexiCaptureExample** sample task includes the following actions.

<Frame>
  <img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/connectors/AA6.png?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=ba0516ff28cfd535330c845dc88eaeb7" alt="Screenshot of the ImportFromFlexiCaptureExample sample task in the Automation Anywhere Task Editor, listing its sequence of actions." width="779" height="492" data-path="images/flexi-capture/connectors/AA6.png" />
</Frame>

## What the task does

The actions at the start of the task set the values of the variables. The Import logic then runs, and the variables pass in its input parameters.

## Variables the task sets

| Variable             | Value it receives                                                                                              |
| -------------------- | -------------------------------------------------------------------------------------------------------------- |
| `LogicFailed`        | `true` if an error occurred, in which case check the MetaBot error log. `false` if the logic ran successfully. |
| `ImportSuccessful`   | `true` if a suitable batch was found. `false` if no suitable batch was found.                                  |
| `DocumentDefinition` | The name of the matching Document Definition, if the import succeeded.                                         |

The task checks the `LogicFailed` output parameter to handle errors from the Import logic.

## What the task reports

If the import succeeds, a message reports that the processing results were saved successfully, and the task copies the name of the matching Document Definition to the Clipboard.

Otherwise, the task displays a failure message.
