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

> 単一文書のCase用に SendForProcessing Pega アクティビティを設定します。Case を開き、添付ファイルをループ処理して、FlexiCapture を呼び出し、バッチ処理を開始します。

アクティビティの作成方法の詳細については、[Pega アクティビティの作成](/ja/flexi-capture/connectors/pega/pega-activity-create)を参照してください。

<div id="pages-classes">
  ## ページとクラス
</div>

| **ページ名**       | **クラス**              |
| -------------- | -------------------- |
| Case           | Work-                |
| Attachment     | Data-WorkAttach-File |
| AttachmentInfo | Data-WorkAttach-File |

<div id="parameters">
  ## パラメーター
</div>

| **Name** | **データ型** | **必須** |
| -------- | -------- | ------ |
| CaseId   | String   | はい     |

<div id="local-variables">
  ## ローカル変数
</div>

| **名前**      | **データ型** |
| ----------- | -------- |
| LinkedRefTo | String   |
| Id          | String   |
| Index       | String   |

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

Step 1:

**メソッド**: 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="Obj-Open-By-Handle メソッド、Case ステップページ、および Param.CaseId の InstanceHandle で設定された Pega のステップ1のスクリーンショット。" width="928" height="279" data-path="images/flexi-capture/connectors/Pega105.png" />
</Frame>

Step 2:

**メソッド**: Property-Set。

| **PropertiesName** | **プロパティ値** |
| ------------------ | ---------- |
| 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="Property-Set メソッドを使用し、PropertiesName に Local.Index、PropertiesValue に 0 を設定した Pega の手順 2 のスクリーンショット。" width="1116" height="206" data-path="images/flexi-capture/connectors/Pega106.png" />
</Frame>

Step 3:

**メソッド**: Property-Set。

| **PropertiesName** | **プロパティ値**                                   |
| ------------------ | -------------------------------------------- |
| Local.LinkedRefTo  | Case.pyAttachments(\<CURRENT>).pxLinkedRefTo |
| Local.Id           | Case.pyAttachments(\<CURRENT>).pzInsKey      |

**ループ**:

| **繰り返し**      | **値リストのプロパティ**     |
| ------------- | ------------------ |
| 値リスト内の各要素について | Case.pyAttachments |

**条件**:

| **条件**         | **true の場合** | **true 時のパラメーター** | **false のとき** | **false パラメータ** |
| -------------- | ------------ | ----------------- | ------------- | --------------- |
| Local.Index==0 | When の判定を続行  |                   | Step をスキップ    |                 |

<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="Pega のステップ 3 で Property-Set メソッドを使用し、Local.LinkedRefTo を現在の Case.pyAttachments 要素の pxLinkedRefTo に、Local.Id をその 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="手順 3 の Pega の Loop ダイアログのスクリーンショット。Repeat は For each element in value list に、Value List Property は 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="Pegaのステップ3のWhen条件ダイアログのスクリーンショット。条件Local.Index==0は、真の場合はContinue Whens、偽の場合はSkip Stepに設定されています。" width="1001" height="235" data-path="images/flexi-capture/connectors/Pega109.png" />
</Frame>

サブステップ 1:

**メソッド**: 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="Obj-Open-By-Handle メソッド、Attachment ステップページ、および Local.LinkedRefTo の InstanceHandle が設定された Pega のサブステップ 1 のスクリーンショット。" width="1098" height="310" data-path="images/flexi-capture/connectors/Pega110.png" />
</Frame>

サブステップ 2:

**メソッド**: 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="Obj-Open-By-Handle メソッド、AttachmentInfo の Step page、Local.Id の InstanceHandle が設定された Pega のサブステップ 2 のスクリーンショット。" width="1096" height="313" data-path="images/flexi-capture/connectors/Pega111.png" />
</Frame>

サブステップ 3:

**メソッド**: Call-Function。

| **関数**                                                                     | **戻り値**  |
| -------------------------------------------------------------------------- | -------- |
| @ABBYY.SendForProcessing(AttachmentInfo.pyMemo, Attachment.pyAttachStream) | .BatchId |

詳細については、[SendForProcessing](/ja/flexi-capture/connectors/pega/pega-func-one-doc#sendforprocessing)を参照してください。

**ジャンプ**:

| **条件**         | **true の場合** | **true 時のパラメーター** | **false のとき** | **false パラメータ** |
| -------------- | ------------ | ----------------- | ------------- | --------------- |
| StepStatusFail | 後のStepにジャンプ  | ERR               |               |                 |

**例外発生時に後のステップラベルにジャンプ**: 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="Pega で Call-Function メソッドを使用したサブステップ 3 のスクリーンショット。関数は @ABBYY.SendForProcessing(AttachmentInfo.pyMemo, Attachment.pyAttachStream)、戻り値は .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="Pega でのサブステップ 3 のジャンプ条件のスクリーンショット。StepStatusFail 条件が true の場合は後続の Step ERR にジャンプし、on-exception ラベルは ERR になります。" width="998" height="279" data-path="images/flexi-capture/connectors/Pega113.png" />
</Frame>

サブステップ 4:

**メソッド**: Call-Function.

| **Function**                                      | **戻り値**          |
| ------------------------------------------------- | ---------------- |
| @ABBYY.WaitFirstVerificationOrProcessed(.BatchId) | .VerificationUrl |

詳細は、[WaitFirstVerificationOrProcessed](/ja/flexi-capture/connectors/pega/pega-func-one-doc#waitfirstverificationorprocessed)を参照してください。

**ジャンプ**:

| **条件**         | **true の場合**       | **true パラメーター** | **false の場合**      | **false パラメーター** |
| -------------- | ------------------ | --------------- | ------------------ | ---------------- |
| StepStatusFail | Jump to Later Step | ERR             | Jump to Later Step | INC              |

**例外発生時にジャンプする後続ステップのラベル**: 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="Pega のサブステップ 4 のスクリーンショット。Call-Function メソッドを使用し、関数は @ABBYY.WaitFirstVerificationOrProcessed(.BatchId)、戻り値は .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="Pega のサブステップ 4 のジャンプ条件のスクリーンショット。StepStatusFail 条件があり、true の場合は後続ステップ ERR にジャンプし、false の場合は INC にジャンプします。例外発生時のラベルは ERR です。" width="990" height="281" data-path="images/flexi-capture/connectors/Pega115.png" />
</Frame>

サブステップ 5:

**ラベル**: ERR.

**メソッド**: Page-Set-Messages.

**メッセージ**: @unescapeHTML(@getWorstMessageName(tools)).

詳細は、[unescapeHTML](/ja/flexi-capture/connectors/pega/pega-func-other)を参照してください。

**ジャンプ**:

| **条件** | **true の場合**  | **true パラメーター** | **false の場合** | **false パラメーター** |
| ------ | ------------- | --------------- | ------------- | ---------------- |
| true   | Exit Activity |                 |               |                  |

<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="Pega のサブステップ 5 のスクリーンショット。ラベルは ERR で、Page-Set-Messages メソッドを使用し、Message は @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="Pega のサブステップ 5 のジャンプ条件のスクリーンショット。When の値は true で、アクティビティを終了します。" width="931" height="256" data-path="images/flexi-capture/connectors/Pega117.png" />
</Frame>

サブステップ 6:

**ラベル**: INC.

**メソッド**: 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="Pega のサブステップ 6 のスクリーンショット。ラベルは INC で、Property-Set メソッドを使用し、PropertiesName は Local.Index、PropertiesValue は Local.Index+ 1 です。" width="1078" height="199" data-path="images/flexi-capture/connectors/Pega118.png" />
</Frame>
