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

# FetchingCapturedData

> Set up the FetchingCapturedData Pega activity for a single-document case to call FlexiCapture for the captured JSON and apply the data transform.

For more information about creating activities, see [Creating a Pega activity](/flexi-capture/connectors/pega/pega-activity-create).

## Pages & Classes

| **Page name** | **Class** |
| ------------- | --------- |
| Case          | Work-     |

## Parameters

| **Name**      | **Data type** | **Required** |
| ------------- | ------------- | ------------ |
| CaseId        | String        | Yes          |
| jsonData      | String        | No           |
| executionMode | String        | No           |

## Steps

Step 1:

**Method**: Obj-Open-By-Handle.

**Step page**: Case.

**InstanceHandle**: Param.CaseId.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega119.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=cc4fd913220489bd1eb8e02cbcc261a1" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 1 with the Obj-Open-By-Handle method on the Case step page and InstanceHandle set to Param.CaseId." width="1122" height="331" data-path="images/flexi-capture/connectors/Pega119.png" />
</Frame>

Step 2:

**Method**: Property-Set.

| **PropertiesName**  | **PropertiesValue**                   |
| ------------------- | ------------------------------------- |
| Param.jsonData      | @ABBYY.FetchingCapturedData(.BatchId) |
| Param.executionMode | DESERIALIZE                           |

For more information, see [FetchingCapturedData](/flexi-capture/connectors/pega/pega-func-one-doc#fetchingcaptureddata).

**Jump**:

| **When**       | **if true**        | **true param** | **if false**       | **false param** |
| -------------- | ------------------ | -------------- | ------------------ | --------------- |
| StepStatusFail | Jump to Later Step | ERR            | Jump to Later Step | OK              |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega120.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=e97dbc72a5667595760607cc8da34084" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 2 with the Property-Set method setting Param.jsonData to @ABBYY.FetchingCapturedData(.BatchId) and Param.executionMode to DESERIALIZE." width="1123" height="240" data-path="images/flexi-capture/connectors/Pega120.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega121.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=eb7140b9d8fe23a95fa01f458c4d0cee" alt="Screenshot of the Jump conditions dialog for Step 2 in Pega, showing the StepStatusFail condition jumping to label ERR if true and to label OK if false, with the on-exception label set to ERR." width="1021" height="298" data-path="images/flexi-capture/connectors/Pega121.png" />
</Frame>

Step 3:

**Label**: ERR.

**Method**: Page-Set-Messages.

**Message**: @unescapeHTML(@getWorstMessageName(tools)).

**Jump**:

| **When** | **if true**   | **true param** | **if false** | **false param** |
| -------- | ------------- | -------------- | ------------ | --------------- |
| true     | Exit Activity |                |              |                 |

For more information, see [unescapeHTML](/flexi-capture/connectors/pega/pega-func-other).

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega122.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=3b441e05344815afc6aa9c1d8c3e8d6c" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 3 labeled ERR with the Page-Set-Messages method and the Message parameter set to @unescapeHTML(@getWorstMessageName(tools))." width="869" height="190" data-path="images/flexi-capture/connectors/Pega122.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega123.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=d9e866ee0a04e7250377cad6d0546da7" alt="Screenshot of the Jump conditions dialog for Step 3 in Pega, showing a When condition of true set to Exit Activity." width="1000" height="296" data-path="images/flexi-capture/connectors/Pega123.png" />
</Frame>

Step 4:

**Label**: OK.

**Method**: Apply-DataTransform.

**DataTransform**: JsonToInvoiceWithVerificationFields.

**PassParameterPage**: true.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega124.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=6ef1fadf242e41298a3d1a097c0efd45" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 4 labeled OK with the Apply-DataTransform method, the DataTransform parameter set to JsonToInvoiceWithVerificationFields, and PassParameterPage selected." width="1116" height="203" data-path="images/flexi-capture/connectors/Pega124.png" />
</Frame>

For more information about creating data transforms, see [Creating a data transform for a single-document processing case](/flexi-capture/connectors/pega/pega-dt-one-doc).
