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

> Configurez l’activité Pega SendForProcessing pour un dossier à document unique : ouvrez le dossier, parcourez les pièces jointes en boucle et appelez FlexiCapture pour lancer le traitement par lot.

Pour plus d’informations sur la création d’activités, consultez [Créer une activité Pega](/fr/flexi-capture/connectors/pega/pega-activity-create).

<div id="pages-classes">
  ## Pages et classes
</div>

| **Nom de la page** | **Classe**           |
| ------------------ | -------------------- |
| dossier            | Work-                |
| Attachment         | Data-WorkAttach-File |
| AttachmentInfo     | Data-WorkAttach-File |

<div id="parameters">
  ## Paramètres
</div>

| **Nom** | **Type de données** | **Obligatoire** |
| ------- | ------------------- | --------------- |
| CaseId  | String              | Oui             |

<div id="local-variables">
  ## Variables locales
</div>

| **Nom**     | **Type de données** |
| ----------- | ------------------- |
| LinkedRefTo | String              |
| Id          | String              |
| Index       | String              |

<div id="steps">
  ## Étapes
</div>

Étape 1 :

**Méthode** : Obj-Open-By-Handle.

**Step page** : Case.

**InstanceHandle** : Param.CaseId.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega105.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=acd7b1240f492e29286b5f2f456d2286" alt="Capture d’écran de l’étape 1 dans Pega, configurée avec la méthode Obj-Open-By-Handle, le champ Step page de Case et un InstanceHandle de Param.CaseId." width="928" height="279" data-path="images/flexi-capture/connectors/Pega105.png" />
</Frame>

Étape 2 :

**Méthode** : Property-Set.

| **PropertiesName** | **PropertiesValue** |
| ------------------ | ------------------- |
| Local.Index        | 0                   |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega106.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=ba893bb18d8502f0c3db8817817c988c" alt="Capture d’écran de l’étape 2 de Pega, configurée avec la méthode Property-Set, un PropertiesName de Local.Index et un PropertiesValue de 0." width="1116" height="206" data-path="images/flexi-capture/connectors/Pega106.png" />
</Frame>

Étape 3 :

**Méthode** : Property-Set.

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

**Boucle** :

| **Répétition**                             | **Propriété de la liste de valeurs** |
| ------------------------------------------ | ------------------------------------ |
| Pour chaque élément de la liste de valeurs | Case.pyAttachments                   |

**When** :

| **When**       | **si la condition est vraie** | **paramètre si vrai** | **si faux**     | **paramètre si false** |
| -------------- | ----------------------------- | --------------------- | --------------- | ---------------------- |
| Local.Index==0 | Poursuivre les When           |                       | Ignorer l’étape |                        |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega107.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=defbfa4362a621026a9ff6e1c23dfff5" alt="Capture d’écran de l’étape 3 dans Pega utilisant la méthode Property-Set, avec Local.LinkedRefTo défini sur le pxLinkedRefTo de l’élément actuel de Case.pyAttachments et Local.Id défini sur son pzInsKey." width="1120" height="238" data-path="images/flexi-capture/connectors/Pega107.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega108.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=dd14bd9d0c06edd5dbced9290efb887a" alt="Capture d’écran de la boîte de dialogue Loop dans Pega à l’étape 3, avec Repeat réglé sur For each element in value list et Value List Property défini sur Case.pyAttachments." width="470" height="169" data-path="images/flexi-capture/connectors/Pega108.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega109.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=4af0f2919dcb8e002014ed8ec0270bd2" alt="Capture d’écran de la boîte de dialogue des conditions When dans Pega pour l’étape 3, où la condition Local.Index==0 est configurée pour Continue Whens si elle est vraie et pour Skip Step si elle est fausse." width="1001" height="235" data-path="images/flexi-capture/connectors/Pega109.png" />
</Frame>

Sous-étape 1 :

**Méthode** : Obj-Open-By-Handle.

**Step page** : Attachment.

**InstanceHandle**: Local.LinkedRefTo

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega110.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=cc92e748bf9483196a8f369a0ed2b065" alt="Capture d’écran de la sous-étape 1 dans Pega, configurée avec la méthode Obj-Open-By-Handle, le champ Attachment step page et, pour InstanceHandle, Local.LinkedRefTo." width="1098" height="310" data-path="images/flexi-capture/connectors/Pega110.png" />
</Frame>

Sous-étape 2 :

**Méthode** : Obj-Open-By-Handle.

**Step page** : AttachmentInfo.

**InstanceHandle** : Local.Id.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega111.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=e64a8844bd880700afe9c831f93d7ca0" alt="Capture d’écran de la sous-étape 2 de Pega, configurée avec la méthode Obj-Open-By-Handle, la page de l’étape AttachmentInfo et un InstanceHandle de Local.Id." width="1096" height="313" data-path="images/flexi-capture/connectors/Pega111.png" />
</Frame>

Sous-étape 3 :

**Méthode** : Call-Function.

| **Fonction**                                                               | **Valeur de retour** |
| -------------------------------------------------------------------------- | -------------------- |
| @ABBYY.SendForProcessing(AttachmentInfo.pyMemo, Attachment.pyAttachStream) | .BatchId             |

Pour plus d'informations, consultez [SendForProcessing](/fr/flexi-capture/connectors/pega/pega-func-one-doc#sendforprocessing).

**Jump** :

| **When**       | **si la condition est vraie** | **paramètre si vrai** | **si faux** | **paramètre si false** |
| -------------- | ----------------------------- | --------------------- | ----------- | ---------------------- |
| StepStatusFail | passer à l’étape ultérieure   | ERR                   |             |                        |

**En cas d'exception, passer à l'étape ultérieure** : ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega112.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=821342a9570521e6691c30f5f147f6b2" alt="Capture d’écran de la sous-étape 3 dans Pega, utilisant la méthode Call-Function, avec la fonction @ABBYY.SendForProcessing(AttachmentInfo.pyMemo, Attachment.pyAttachStream) et pour valeur de retour .BatchId." width="859" height="189" data-path="images/flexi-capture/connectors/Pega112.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega113.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=4add505d7eabcc578a43d5fa58d00fd7" alt="Capture d’écran des conditions Jump pour la sous-étape 3 dans Pega, avec une condition StepStatusFail qui redirige vers l’étape ERR située plus loin si elle est vraie, et un libellé on-exception ERR." width="998" height="279" data-path="images/flexi-capture/connectors/Pega113.png" />
</Frame>

Sous-étape 4 :

**Méthode**: Call-Function.

| **Fonction**                                      | **Valeur de retour** |
| ------------------------------------------------- | -------------------- |
| @ABBYY.WaitFirstVerificationOrProcessed(.BatchId) | .VerificationUrl     |

Pour plus d’informations, voir [WaitFirstVerificationOrProcessed](/fr/flexi-capture/connectors/pega/pega-func-one-doc#waitfirstverificationorprocessed).

**Saut**:

| **Condition**  | **si vrai**                   | **paramètre vrai** | **si faux**                   | **paramètre faux** |
| -------------- | ----------------------------- | ------------------ | ----------------------------- | ------------------ |
| StepStatusFail | Passer à une étape ultérieure | ERR                | Passer à une étape ultérieure | INC                |

**En cas d’exception, passer à l’étiquette de l’étape ultérieure**: ERR

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega114.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=daf5a76f7855f2fdd079d94407995623" alt="Capture d’écran de la sous-étape 4 dans Pega utilisant la méthode Call-Function, avec la fonction @ABBYY.WaitFirstVerificationOrProcessed(.BatchId) et une valeur de retour de .VerificationUrl." width="1083" height="235" data-path="images/flexi-capture/connectors/Pega114.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega115.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=764b540e078cd46fa1eecb32a45414dc" alt="Capture d’écran des conditions de saut de la sous-étape 4 dans Pega, avec une condition StepStatusFail qui passe à l’étape ultérieure ERR si elle est vraie et à INC si elle est fausse, et une étiquette ERR en cas d’exception." width="990" height="281" data-path="images/flexi-capture/connectors/Pega115.png" />
</Frame>

Sous-étape 5 :

**Étiquette**: ERR.

**Méthode**: Page-Set-Messages.

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

Pour plus d’informations, voir [unescapeHTML](/fr/flexi-capture/connectors/pega/pega-func-other).

**Saut**:

| **Condition** | **si vrai**        | **paramètre vrai** | **si faux** | **paramètre faux** |
| ------------- | ------------------ | ------------------ | ----------- | ------------------ |
| true          | Quitter l’activité |                    |             |                    |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega116.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=8225fc634ae551bd51dbbc6c1aeadbaf" alt="Capture d’écran de la sous-étape 5 dans Pega, étiquetée ERR, utilisant la méthode Page-Set-Messages avec le Message défini sur @unescapeHTML(@getWorstMessageName(tools))." width="1092" height="241" data-path="images/flexi-capture/connectors/Pega116.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega117.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=e61995d460bec6a0e6c570aac6e98328" alt="Capture d’écran des conditions de saut de la sous-étape 5 dans Pega, avec une valeur Condition définie sur true qui quitte l’activité." width="931" height="256" data-path="images/flexi-capture/connectors/Pega117.png" />
</Frame>

Sous-étape 6 :

**Étiquette**: INC.

**Méthode**: Property-Set.

| **PropertiesName** | **PropertiesValue** |
| ------------------ | ------------------- |
| Local.Index        | Local.Index+ 1      |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega118.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=c00c72678eb35dc51d238503bb1c37ac" alt="Capture d’écran de la sous-étape 6 dans Pega, étiquetée INC, utilisant la méthode Property-Set avec un PropertiesName de Local.Index et une PropertiesValue de Local.Index+ 1." width="1078" height="199" data-path="images/flexi-capture/connectors/Pega118.png" />
</Frame>
