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

# カスタム アクティビティ

> カスタム アクティビティを使用すると、Vantage では利用できないサードパーティ製ツールを活用し、Skill の処理中に受信したドキュメントに対して追加のアクションを実行できます。

**Custom** アクティビティは、トランザクション内のドキュメントに関する情報を収集し、HTTP リクエストを通じて外部システムに送信します。応答を受信すると、それを処理してトランザクション データに保存します。1 件またはすべてのトランザクションのドキュメントを、1 回のリクエストで渡すことができます。

<Warning>
  カスタム アクティビティでは、接続の安全性を検証するために [security level 2](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html#DEFAULT-CALLBACK-BEHAVIOUR) の SSL 証明書が必要です。サーバーのセキュリティレベルがこれを下回る場合、カスタム アクティビティからそのサーバーへリクエストを送信することはできません。
</Warning>

<Note>
  各ドキュメントを個別に処理するには、カスタム アクティビティを [For Each Document](/ja/vantage/documentation/skill-designer/process/for-each) アクティビティ内に配置します。この場合、カスタム アクティビティがアクセスできるのは一度に 1 件のドキュメントのみです。
</Note>

<div id="set-up-a-custom-activity">
  ## Custom activityを設定する
</div>

<Steps>
  <Step title="アクティビティを追加する">
    Process skillデザイナーで、文書処理ワークフローに**Custom**アクティビティブロックを追加します。
  </Step>

  <Step title="アクティビティの設定を開く">
    **Actions**ペインで、**Edit Activity**をクリックします。
  </Step>

  <Step title="使用可能なファイルを選択する">
    **Available Files**タブで、外部システムに送信するテキスト、文書のfield、画像の形式を選択します。各型で少なくとも1つの形式を選択する必要があります。
  </Step>

  <Step title="スクリプトを記述する">
    **Activity Script**タブでスクリプトを設定し、**Save**をクリックします。
  </Step>
</Steps>

スクリプトで使用できるオブジェクトの詳細については、[Object model](/ja/vantage/documentation/skill-designer/process/custom-activity/object-model)を参照してください。例については、[Sample scripts](/ja/vantage/documentation/skill-designer/process/custom-activity/sample-scripts)を参照してください。

<div id="verify-the-custom-activity">
  ## カスタム アクティビティ を検証する
</div>

<Steps>
  <Step title="Skill を公開する">
    **Publish** タブをクリックし、名前、説明、変更内容の説明を入力してから、**Publish Skill** をクリックします。
  </Step>

  <Step title="ワークフローを実行する">
    カスタム アクティビティ を使用するワークフローでドキュメントを処理します。
  </Step>

  <Step title="Skill Monitor で結果を確認する">
    Skill Monitor で Skill の実行結果を確認します。スクリプトでエラーが発生すると、トランザクションは中断され、エラーが **Transaction Event Log** に表示されます。[`LogMessage`](/ja/vantage/documentation/skill-designer/process/custom-activity/context) を使用してカスタム ログ エントリを追加した場合は、それらも Transaction Event Log に表示されます。
  </Step>
</Steps>

<div id="deprecated-interfaces">
  ## 非推奨のインターフェイス
</div>

<Warning>
  Custom activity が更新されました。廃止予定のスクリプトは引き続き動作し、トランザクション内のすべてのドキュメントにアクセスできますが、以下の非推奨インターフェイスからアクセスできるのは、トランザクション内の最初のドキュメントのみです。
</Warning>

| 非推奨のオブジェクト                                                                                         | 置き換え先                                                                                                 |
| :------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------- |
| [InputData](/ja/vantage/documentation/skill-designer/process/custom-activity/input-data)           | [Transaction.Documents](/ja/vantage/documentation/skill-designer/process/custom-activity/transaction) |
| [OutputData](/ja/vantage/documentation/skill-designer/process/custom-activity/output-data)         | [Transaction.Documents](/ja/vantage/documentation/skill-designer/process/custom-activity/transaction) |
| [ExtractedData](/ja/vantage/documentation/skill-designer/process/custom-activity/extracted-data)   | [Document](/ja/vantage/documentation/skill-designer/process/custom-activity/document)                 |
| [ExtractedField](/ja/vantage/documentation/skill-designer/process/custom-activity/extracted-field) | [Field](/ja/vantage/documentation/skill-designer/process/custom-activity/field)                       |
| [FieldType](/ja/vantage/documentation/skill-designer/process/custom-activity/field-type)           | [FieldOcrType](/ja/vantage/documentation/skill-designer/process/custom-activity/field-ocr-type)       |

<div id="related-topics">
  ## 関連トピック
</div>

* [オブジェクト モデル](/ja/vantage/documentation/skill-designer/process/custom-activity/object-model)
* [サンプルスクリプト](/ja/vantage/documentation/skill-designer/process/custom-activity/sample-scripts)
* [For Each Document アクティビティ](/ja/vantage/documentation/skill-designer/process/for-each)
* [Process skill の設定](/ja/vantage/documentation/skill-designer/process/set-up)
* [Skill Monitor のトランザクション](/ja/vantage/documentation/runtime/skill-monitor/transactions)
