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

# SendForProcessing

> Konfigurieren Sie die Pega-Aktivität SendForProcessing für einen Case mit mehreren Dokumenten: Erstellen Sie einen Batch, fügen Sie jeden Anhang hinzu, starten Sie die Verarbeitung und speichern Sie die BatchId.

Weitere Informationen zum Erstellen von Aktivitäten finden Sie unter [Erstellen einer Pega-Aktivität](/de/flexi-capture/connectors/pega/pega-activity-create).

<div id="pages-classes">
  ## Seiten & Klassen
</div>

| **Seitenname** | **Klasse**           |
| -------------- | -------------------- |
| Case           | Work-                |
| Attachment     | Data-WorkAttach-File |
| AttachmentInfo | Data-WorkAttach-File |

<div id="parameters">
  ## Parameter
</div>

| **Name** | **Datentyp** | **Erforderlich** |
| -------- | ------------ | ---------------- |
| CaseId   | String       | Ja               |

<div id="local-variables">
  ## Lokale Variablen
</div>

| **Name**    | **Datentyp** |
| ----------- | ------------ |
| LinkedRefTo | String       |
| Id          | String       |
| BatchId     | String       |

<div id="steps">
  ## Schritte
</div>

Schritt 1:

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

**Step page**: Case.

**InstanceHandle**: Param.CaseId.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega129.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=264503b5f2e968c537e056eb862a4b3d" alt="Screenshot von Schritt 1 in Pega, konfiguriert mit der Methode Obj-Open-By-Handle, der Step page Case und einem InstanceHandle von Param.CaseId." width="1112" height="330" data-path="images/flexi-capture/connectors/Pega129.png" />
</Frame>

Schritt 2:

**Method**: Page-Set-Messages

**Message**: "Bitte fügen Sie dem Case Dateien hinzu, bevor Sie fortfahren."

**Wann**:

| **Bedingung**     | **bei true**         | **Parameter bei „true“** | **wenn false**       | **Parameter bei false** |
| ----------------- | -------------------- | ------------------------ | -------------------- | ----------------------- |
| Anhänge sind null | Mit Whens fortfahren |                          | Schritt überspringen |                         |

<Note>
  Um eine Bedingung zu erstellen, tragen Sie *AttachmentsIsNull* in das Feld **When** ein und klicken Sie auf die Konfigurationsschaltfläche. Wenn eine solche Bedingung noch nicht vorhanden ist, öffnet sich ein Fenster, in dem Sie eine neue Bedingung erstellen können. Stellen Sie sicher, dass der vollständige Name des Case im Feld **Apply to** angegeben ist, und klicken Sie auf **Create and open**. Erstellen Sie auf der Registerkarte **Conditions** die folgende Bedingung: *length of .pyAttachments is Equal To 0*. Um die Bedingung hinzuzufügen, klicken Sie auf **Configure advanced conditions here…** und wählen Sie als Bedingungstyp *length of \[a pagelist property] Is \[comparison operator] \[value]* aus.
</Note>

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega206.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=832bc4ad8667169ff7d0a47d18a09233" alt="Screenshot des Dialogfelds Conditions in Pega, in dem die Bedingung AttachmentsIsNull als length of .pyAttachments Is Equal To 0 definiert ist." width="590" height="205" data-path="images/flexi-capture/connectors/Pega206.png" />
</Frame>

**Springen**:

| **Wenn** | **falls wahr**    | **Parameter bei true** | **bei false** | **Parameter bei „false“** |
| -------- | ----------------- | ---------------------- | ------------- | ------------------------- |
| wahr     | Aktivität beenden |                        |               |                           |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega131.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=f6dac5fa332eca91b0d87004b1766f09" alt="Screenshot von Schritt 2 in Pega mit der Methode Page-Set-Messages, wobei Message auf den Text gesetzt ist, der den Benutzer auffordert, dem Case Dateien hinzuzufügen, bevor er fortfährt." width="1124" height="246" data-path="images/flexi-capture/connectors/Pega131.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega132.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=301dc06d8ee79e25f99a08e5ac606abc" alt="Screenshot des Dialogfelds mit den When-Bedingungen in Pega für Schritt 2, wobei die Bedingung AttachmentsIsNull auf Continue Whens bei true und Skip Step bei false gesetzt ist." width="991" height="229" data-path="images/flexi-capture/connectors/Pega132.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega133.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=05101cb84668bb92da9eef7fb6b16015" alt="Screenshot der Jump-Bedingungen für Schritt 2 in Pega, mit einem When-Wert von true, der die Aktivität beendet." width="991" height="282" data-path="images/flexi-capture/connectors/Pega133.png" />
</Frame>

Schritt 3:

**Methode**: Call-Function

| **Funktion**            | **Rückgabewert** |
| ----------------------- | ---------------- |
| @ABBYY.CreateNewBatch() | Local.BatchId    |

Weitere Informationen finden Sie unter [CreateNewBatch](/de/flexi-capture/connectors/pega/pega-func-multiple-docs#createnewbatch).

**Jump**:

| **Bedingung**  | **bei true**                       | **Parameter für true** | **bei false** | **Parameter bei false** |
| -------------- | ---------------------------------- | ---------------------- | ------------- | ----------------------- |
| StepStatusFail | Zu einem späteren Schritt springen | ERR                    |               |                         |

**Bei Ausnahme zu späterem Schritt-Label springen**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega134.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=4ff42d9611966705f28822c6b6d83dae" alt="Screenshot von Schritt 3 in Pega mit der Methode Call-Function, der Funktion @ABBYY.CreateNewBatch() und einem Rückgabewert von Local.BatchId." width="1106" height="242" data-path="images/flexi-capture/connectors/Pega134.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega135.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=4637c13bb148f6c95a76168be96679a0" alt="Screenshot der Jump-Bedingungen für Schritt 3 in Pega, mit einer StepStatusFail-Bedingung, die bei true zum späteren Schritt ERR springt, und einem On-Exception-Label ERR." width="989" height="279" data-path="images/flexi-capture/connectors/Pega135.png" />
</Frame>

Schritt 4:

**Methode**: Property-Set

| **PropertiesName** | **PropertiesValue**                          |
| ------------------ | -------------------------------------------- |
| Local.LinkedRefTo  | Case.pyAttachments(\<CURRENT>).pxLinkedRefTo |
| Local.Id           | Case.pyAttachments(\<CURRENT>).pzInsKey      |

**Schleife**:

| **Wiederholen**                  | **Eigenschaft in der Werteliste** |
| -------------------------------- | --------------------------------- |
| Für jedes Element der Werteliste | Case.pyAttachments                |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega136.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=f4a8ca8d62742c7f376f38700cc11698" alt="Screenshot von Schritt 4 in Pega mit der Methode Property-Set, wobei Local.LinkedRefTo auf das pxLinkedRefTo des aktuellen Elements in Case.pyAttachments und Local.Id auf dessen pzInsKey gesetzt ist." width="1092" height="236" data-path="images/flexi-capture/connectors/Pega136.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega137.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=e85f94b87589d370222f6a4886ee19a0" alt="Screenshot des Dialogfelds Loop in Pega für Schritt 4, wobei Repeat auf For each element in value list und Value List Property auf Case.pyAttachments gesetzt ist." width="453" height="150" data-path="images/flexi-capture/connectors/Pega137.png" />
</Frame>

Teilschritt 1:

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

**Step page**: Attachment.

**InstanceHandle**: Local.LinkedRefTo.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega138.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=3b89f21720558e2ce48925a0bebaf9d1" alt="Screenshot von Teilschritt 1 in Pega, konfiguriert mit der Methode Obj-Open-By-Handle, der Step page Attachment und dem InstanceHandle Local.LinkedRefTo." width="1066" height="301" data-path="images/flexi-capture/connectors/Pega138.png" />
</Frame>

Teilschritt 2:

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

**Step page**: AttachmentInfo.

**InstanceHandle**: Local.Id.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega139.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=95b2eaaf9b38142afbeb68af34949462" alt="Screenshot von Teilschritt 2 in Pega, konfiguriert mit der Methode Obj-Open-By-Handle, der Step page AttachmentInfo und dem InstanceHandle Local.Id." width="1069" height="299" data-path="images/flexi-capture/connectors/Pega139.png" />
</Frame>

Teilschritt 3:

**Methode**: Call-Function

| **Funktion**                                                                               | **Rückgabewert** |
| ------------------------------------------------------------------------------------------ | ---------------- |
| @ABBYY.AddDocumentToBatch(Local.BatchId, AttachmentInfo.pyMemo, Attachment.pyAttachStream) |                  |

Weitere Informationen finden Sie unter [AddDocumentToBatch](/de/flexi-capture/connectors/pega/pega-func-multiple-docs#adddocumenttobatch).

**Jump**:

| **When**       | **if true**                        | **true param** | **if false** | **false param** |
| -------------- | ---------------------------------- | -------------- | ------------ | --------------- |
| StepStatusFail | Zu einem späteren Schritt springen | ERR            |              |                 |

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

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega140.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=72a3fbb25ece8278700433b0732c39fa" alt="Screenshot von Teilschritt 3 in Pega mit der Methode Call-Function, der Funktion @ABBYY.AddDocumentToBatch(Local.BatchId, AttachmentInfo.pyMemo, Attachment.pyAttachStream) und ohne Rückgabewert." width="1067" height="201" data-path="images/flexi-capture/connectors/Pega140.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega141.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=43fad5c2f66fe2391b73bd83dc5668f9" alt="Screenshot der Jump-Bedingungen für Teilschritt 3 in Pega mit der Bedingung StepStatusFail, die bei true zum späteren Schritt ERR springt, sowie dem On-exception-Label ERR." width="990" height="279" data-path="images/flexi-capture/connectors/Pega141.png" />
</Frame>

Schritt 5:

**Methode**: Call-Function

| **Funktion**                             | **Rückgabewert** |
| ---------------------------------------- | ---------------- |
| @ABBYY.RunBatchProcessing(Local.BatchId) |                  |

Weitere Informationen finden Sie unter [RunBatchProcessing](/de/flexi-capture/connectors/pega/pega-func-multiple-docs#runbatchprocessing).

**Jump**:

| **When**       | **if true**                        | **true param** | **if false** | **false param** |
| -------------- | ---------------------------------- | -------------- | ------------ | --------------- |
| StepStatusFail | Zu einem späteren Schritt springen | ERR            |              |                 |

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

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega142.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=bfe753784aa3f6d2b6a8f565163a6730" alt="Screenshot von Schritt 5 in Pega mit der Methode Call-Function, der Funktion @ABBYY.RunBatchProcessing(Local.BatchId) und ohne Rückgabewert." width="1095" height="202" data-path="images/flexi-capture/connectors/Pega142.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega143.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=8f2888d8319a6d80fae266b87a054b60" alt="Screenshot der Jump-Bedingungen für Schritt 5 in Pega mit der Bedingung StepStatusFail, die bei true zum späteren Schritt ERR springt, sowie dem On-exception-Label ERR." width="986" height="276" data-path="images/flexi-capture/connectors/Pega143.png" />
</Frame>

Schritt 6:

**Methode**: Call-Function

| **Funktion**                                                              | **Rückgabewert** |
| ------------------------------------------------------------------------- | ---------------- |
| @ABBYY.WaitFirstVerificationOrProcessedForMultiFileInvoice(Local.BatchId) | .VerificationUrl |

Weitere Informationen finden Sie unter [WaitFirstVerificationOrProcessedForMultiFileInvoice](/de/flexi-capture/connectors/pega/pega-func-multiple-docs#waitfirstverificationorprocessedformultifileinvoice).

**Jump**:

| **When**       | **wenn wahr**                      | **Parameter bei „wahr“** | **wenn falsch**                    | **Parameter bei „falsch“** |
| -------------- | ---------------------------------- | ------------------------ | ---------------------------------- | -------------------------- |
| StepStatusFail | Zu einem späteren Schritt springen | ERR                      | Zu einem späteren Schritt springen | OK                         |

**Bei Ausnahme zu einem späteren Schritt-Label springen**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega144.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=00819c28fc617143f6ac143019f94d8c" alt="Screenshot von Schritt 6 in Pega mit der Methode Call-Function, der Funktion @ABBYY.WaitFirstVerificationOrProcessedForMultiFileInvoice(Local.BatchId) und dem Rückgabewert .VerificationUrl." width="1084" height="196" data-path="images/flexi-capture/connectors/Pega144.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega145.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=fcf586e2ab1e6107c3b2888bddc71b36" alt="Screenshot der Sprungbedingungen für Schritt 6 in Pega mit der Bedingung StepStatusFail, die bei „wahr“ zum späteren Schritt ERR und bei „falsch“ zu OK springt, sowie dem Ausnahme-Label ERR." width="987" height="276" data-path="images/flexi-capture/connectors/Pega145.png" />
</Frame>

Schritt 7:

**Label**: ERR.

**Methode**: Page-Set-Messages.

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

Weitere Informationen finden Sie unter [unescapeHTML](/de/flexi-capture/connectors/pega/pega-func-other).

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega146.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=2e3b7ca6205295f551b268fb129a88bf" alt="Screenshot von Schritt 7 in Pega mit dem Label ERR, der Methode Page-Set-Messages und Message = @unescapeHTML(@getWorstMessageName(tools))." width="876" height="187" data-path="images/flexi-capture/connectors/Pega146.png" />
</Frame>

Schritt 8:

**Label**: OK.

**Methode**: Property-Set.

| **PropertiesName** | **PropertiesValue** |
| ------------------ | ------------------- |
| .BatchId           | Local.BatchId       |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega147.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=c7d066f827fc0257c0100de2c2946d1f" alt="Screenshot von Schritt 8 in Pega mit dem Label OK, der Methode Property-Set und PropertiesName .BatchId mit dem Wert Local.BatchId." width="1101" height="190" data-path="images/flexi-capture/connectors/Pega147.png" />
</Frame>
