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

# UpdateVerificationUrl activity for a multi-document case

> Configure the UpdateVerificationUrl Pega activity for a multi-document case: refresh the VerificationUrl from ABBYY FlexiCapture and save the case with Obj-Save.

The `UpdateVerificationUrl` activity asks ABBYY FlexiCapture for the current verification URL, writes it to the case, and saves the case.

For the general procedure, see [Create a Pega activity](/flexi-capture/connectors/pega/pega-activity-create).

## Pages and classes

| Page name | Class   |
| --------- | ------- |
| `Case`    | `Work-` |

## Parameters

| Name     | Data type | Required |
| -------- | --------- | -------- |
| `CaseId` | `String`  | Yes      |

## Activity steps

<Steps>
  <Step title="Open the case">
    | Field              | Value                |
    | ------------------ | -------------------- |
    | **Method**         | `Obj-Open-By-Handle` |
    | **Step page**      | `Case`               |
    | **InstanceHandle** | `Param.caseId`       |

    <Frame>
      <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega162.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=82bee36280f87613aea22143e795a236" alt="Screenshot of the UpdateVerificationUrl 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="1103" height="324" data-path="images/flexi-capture/connectors/Pega162.png" />
    </Frame>
  </Step>

  <Step title="Refresh the verification URL">
    Set **Method** to `Property-Set` and the property as follows:

    | PropertiesName     | PropertiesValue                                                        |
    | ------------------ | ---------------------------------------------------------------------- |
    | `.VerificationUrl` | `@ABBYY.WaitFirstVerificationOrProcessedForMultiFileInvoice(.BatchId)` |

    For more information, see [WaitFirstVerificationOrProcessedForMultiFileInvoice](/flexi-capture/connectors/pega/pega-func-multiple-docs#waitfirstverificationorprocessedformultifileinvoice).

    Add the following **Jump** condition, and set **On exception, jump to later step label** to `ERR`:

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

    <Frame>
      <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega163.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=bc3f982a3763cb6c34962ec35d61c2df" alt="Screenshot of the UpdateVerificationUrl activity in Pega, showing Step 2 with the Property-Set method setting .VerificationUrl to @ABBYY.WaitFirstVerificationOrProcessedForMultiFileInvoice(.BatchId)." width="1102" height="202" data-path="images/flexi-capture/connectors/Pega163.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega164.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=41c6672cf7b813e26ac852bc34c54d15" 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="994" height="271" data-path="images/flexi-capture/connectors/Pega164.png" />
    </Frame>
  </Step>

  <Step title="Post the error message">
    | Field       | Value                                        |
    | ----------- | -------------------------------------------- |
    | **Label**   | `ERR`                                        |
    | **Method**  | `Page-Set-Messages`                          |
    | **Message** | `@unescapeHTML(@getWorstMessageName(tools))` |

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

    Add the following **Jump** condition:

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

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

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

  <Step title="Save the case">
    | Field          | Value      |
    | -------------- | ---------- |
    | **Label**      | `OK`       |
    | **Method**     | `Obj-Save` |
    | **WriteNow**   | `True`     |
    | **WithErrors** | `False`    |
    | **OnlyIfNew**  | `False`    |

    <Frame>
      <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega167.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=1848726ab0df87e9b945c9b7fd09162f" alt="Screenshot of the UpdateVerificationUrl activity in Pega, showing Step 4 labeled OK with the Obj-Save method and its WriteNow, WithErrors, and OnlyIfNew parameters." width="1098" height="230" data-path="images/flexi-capture/connectors/Pega167.png" />
    </Frame>
  </Step>
</Steps>
