---
schema_version: "1"
id: cc25052a0812ea8e467b03072f8b7b1f5b42cf1c5aa72c831b13a4005b03af2d
title: Anypoint Studio を使用した Veeva Vault Connector 1.3 の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/veevavault-connector/1.3/veevavault-connector-studio.md
canonical_url: https://docs.mulesoft.com/jp/veevavault-connector/1.3/veevavault-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 33bafe8c52219d10a409eceae5abc26e8dfd6529558fd0acd66265dc416a4da1
description: MuleSoft Documentation Site
release: "1.3"
latest: false
---
# Anypoint Studio を使用した Veeva Vault Connector 1.3 の設定

Anypoint Studio (Studio) エディターは、Mule アプリケーション、プロパティ、および設定ファイルの設計と更新に役立ちます。

Studio でコネクタを追加および設定する手順は、次のとおりです。

1. [Mule プロジェクトを作成します](#create-mule-project)​。
2. [コネクタを Mule プロジェクトに追加します](#add-connector-to-project)​。
3. [コネクタのフローのソースを設定します](#configure-source)​。
4. [フローにコネクタの操作を追加します](#add-connector-operation)​。
5. [コネクタのグローバル要素を設定します](#configure-global-element)​。

[「アプリケーションログの表示」](#view-app-log)​で説明されているように、コネクタを実行するときに、リアルタイムでアプリケーションログを表示して問題を確認できます。

Studio で初めてコネクタを設定する場合は、​[「Anypoint Studio を使用したコネクタの設定」](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)​を参照してください。このトピックを参照した後、コネクタ項目についての詳細情報が必要な場合は、​[「Veeva Vault リファレンス」](https://docs.mulesoft.com/jp/veevavault-connector/1.3/veevavault-connector-reference)​を参照してください。

## [](#create-mule-project)Mule プロジェクトを作成する

Studio で、コネクタを追加および設定する新しい Mule プロジェクトを作成します。

1. Studio で、​**\[File (ファイル)\] > \[New (新規)\] > \[Mule Project (Mule プロジェクト)\]**​ を選択します。
2. Mule プロジェクトの名前を入力して、​**\[Finish (完了)\]**​ をクリックします。

## [](#add-connector-to-project)コネクタを Mule プロジェクトに追加する

Veeva Vault Connector を Mule プロジェクトに追加して、XML コードにコネクタの名前空間およびスキーマの場所を自動的に入力し、プロジェクトの ​`pom.xml`​ ファイルに必須の連動関係を追加します。

1. **\[Mule Palette (Mule パレット)\]**​ で、​**\[(X) Search in Exchange ((X) Exchange 内を検索)\]**​ をクリックします。
2. **\[Add Dependencies to Project (連動関係をプロジェクトに追加)\]**​ で、検索項目に「​`veeva vault`​」と入力します。
3. **\[Available modules (使用可能なモジュール)\]**​ で \[Veeva Vault\] をクリックします。
4. **\[Add (追加)\]**​ をクリックします。
5. **\[Finish (完了)\]**​ をクリックします。

Studio でコネクタを Mule プロジェクトに追加しても、Studio ワークスペースの他のプロジェクトはそのコネクタを使用できません。

## [](#configure-source)ソースの設定

ソースは、指定された条件が満たされたときにフローを開始します。 次のソースのいずれかを Veeva Vault Connector で使用するように設定できます。

- HTTP リスナー  
    設定されたホストとポートで要求を受信するたびにフローを開始する
- スケジューラー  
    時間ベースの条件が満たされたときにフローを開始する

たとえば、HTTP Listener ソースを設定する手順は、次のとおりです。

1. **\[Mule Palette (Mule パレット)\]**​ で、​**\[HTTP\] > \[Listener\]**​ を選択します。
2. **\[Listener\]**​ を Studio キャンバスにドラッグします。
3. **\[Listener (リスナー)\]**​ 設定画面で、必要に応じて ​**\[Display Name (表示名)\]**​ 項目の値を変更します。
4. **\[Path (パス)\]**​ 項目の値を指定します。
5. **\[Connector configuration (コネクタ設定)\]**​ 項目の横にあるプラス記号 (​**+**​) をクリックして、アプリケーション内の HTTP Listener ソースのすべてのインスタンスで使用できるグローバル要素を設定します。
6. **\[General (一般)\]**​ タブで、コネクタの接続情報を指定します。
7. **\[TLS\]**​ タブで、必要に応じてコネクタの TLS 情報を指定します。
8. **\[Advanced (詳細)\]**​ タブで、必要に応じて再接続戦略を含む再接続情報を指定します。
9. **\[Test Connection (接続をテスト)\]**​ をクリックして、Mule が指定されたサーバーに接続できることを確認します。
10. **\[OK\]**​ をクリックします。

## [](#add-connector-operation)フローにコネクタの操作を追加する

フローにコネクタの操作を追加するときは、そのコネクタで実行するアクションを指定しています。

Veeva Vault Connector の操作を追加する手順は、次のとおりです。

1. **\[Mule Palette (Mule パレット)\]**​ で、​**\[Veeva Vault\]**​ を選択し、目的の操作を選択します。
2. その操作を Studio キャンバスの入力元の横にドラッグします。

## [](#configure-global-element)コネクタのグローバル要素を設定する

コネクタを設定する場合、アプリケーション内のそのコネクタのすべてのインスタンスで使用できるグローバル要素を設定します。グローバル要素を設定するには、コネクタが対象の Veeva Vault システムにアクセスするために必要な認証ログイン情報を指定する必要があります。Veeva Vault Connector では、基本認証がサポートされています。

Veeva Vault Connector のグローバル要素を設定する手順は、次のとおりです。

1. Studio キャンバスで操作を選択します。
2. 操作の ​**\[General (一般)\]**​ 設定画面で、​**\[Add (追加)\]**​ アイコンをクリックして、グローバル要素設定項目にアクセスします。
3. **\[General (一般)\]**​ タブの ​**\[Connection (接続)\]**​ で、​[\[Veeva Vault Config (Veeva Vault 設定)\]](#basic-auth)​ 方法を選択して基本認証を設定します。
    
    ANT スタイルのプロパティプレースホルダーを含む設定ファイルを参照するか (推奨)、グローバル設定プロパティに認証ログイン情報を入力できます。プロパティプレースホルダーを使用する利点とその設定方法については、​[「Anypoint Connector 設定」](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview)​を参照してください。
4. **\[Advanced (詳細)\]**​ タブで、必要に応じて再接続戦略を含む再接続情報を指定します。
5. **\[Test Connection (接続をテスト)\]**​ をクリックして、Mule が指定されたサーバーに接続できることを確認します。
6. **\[OK\]**​ をクリックします。

### [](#basic-auth)基本認証

**\[Global Element Properties (グローバル要素のプロパティ)\]**​ 画面の ​**\[General (一般)\]**​ タブで次の情報を入力し、基本認証を設定します。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 30%;">
<col style="width: 70%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>名前</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>設定名</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Vault URL</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>接続に必要な Veeva Vault インスタンスの URL</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Username (ユーザー名)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>セッションの初期化に使用するユーザー名</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Password (パスワード)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>ユーザーの認証に使用するパスワード</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Client Id (クライアント ID)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>追跡の目的で各リクエストヘッダーと共に Veeva Vault インスタンスに送信するクライアント ID (​<code>{organization}-{company/team}</code>​ の形式)。<br></p>
</div>
<div class="paragraph">
<p>クライアント ID には、​<code>mulesoft</code>​ プレフィックスと ​<code>client-vaultconnector</code>​ サフィックスが含まれます。例: <code>mulesoft-abcpharma-clinicalprod-client-vaultconnector</code>​。</p>
</div></div></td>
</tr>
</tbody>
</table>

次の画像は、​**\[General (一般)\]**​ タブでの基本認証の設定例を示しています。

![「General (一般)」 タブで入力される基本認証の認証項目](/mulesoft/current/ja-jp/veevavault-connector/1.3/_images/basic-auth.png)

**\[Global Element Properties (グローバル要素のプロパティ)\]**​ 画面の ​**\[Advanced (詳細)\]**​ タブで次の情報を入力し、基本認証のバースト API 制限を設定します。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 30%;">
<col style="width: 70%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Response Timeout (応答タイムアウト)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>コネクタが Veeva Vault の応答を待機する最大時間 (ミリ秒単位)。この最大時間を超えると、タイムアウト例外がスローされます。デフォルトは 30,000 ミリ秒 (30 秒) です。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Burst API Limit Profile (バースト API 制限プロファイル)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>[Burst API limit profile (バースト API 制限プロファイル)] 設定は、Veeva Vault API の指定されたバースト API 制限が、設定されたしきい値に達するか超えた場合に機能します。<br></p>
</div>
<div class="paragraph">
<p><strong>[Burst API limit config (バースト API 制限の設定)]</strong>​ が有効になっている場合 (デフォルト)、コネクタは、指定された ​<strong>API 制限しきい値</strong>​に対して Veeva Vault API のレスポンスヘッダー (​<code>X-VaultAPI-BurstLimitRemaining</code>​) 値を評価します。残りのバースト API 制限が ​<strong>[API Limit Threshold (API 制限しきい値)]</strong>​ の指定された値に達するか超えた場合、コネクタは指定された時間待機して ​<strong>[Burst Limit Remaining (残りのバースト制限)]</strong>​ の計数を再開します。<br></p>
</div>
<div class="paragraph">
<p>次の例は、​<code>2019-06-06 10:34:45,096</code>​ の警告メッセージが含まれているアプリケーションログの例を示しています。​<code>2019-06-06 10:39:45,098</code>​ の次のメッセージで示されているように 5 分間プロセスが停止しています。</p>
</div>
<div class="listingblock">
<div class="content">
<pre>WARN 2019-06-06 10:34:45,096 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Burst API Limit remaining calls [1997] has exceeded/reached an API Limit Profile threshold set as [1997]. As per API Limit Profile, Veeva Vault Connector will wait for [5] MINUTES.

WARN 2019-06-06 10:39:45,098 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.operations.VeevaVaultOperations: Properties or Fields is not available for api [/api/v18.2/metadata/objects/documents/types/site_management__c] , will use input list [[name__v, type__v, subtype__v, classification__v, lifecycle__v, status__v, study__v, product__v, id]] if configured to build VQL query

INFO 2019-06-06 10:39:45,098 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.pagination.GetDocumentsPagingProvider: Query Build :: SELECT name__v, type__v, subtype__v, classification__v, lifecycle__v, status__v, study__v, product__v, id FROM documents WHERE name__v= 'F22611234--6764'

INFO 2019-06-06 10:39:46,024 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Response received for sync http request :: 'https://[vault-domain]/api/v18.2/query?q=SELECT+name__v%2C+type__v%2C+subtype__v%2C+classification__v%2C+lifecycle__v%2C+status__v%2C+study__v%2C+product__v%2C+id+FROM+documents+WHERE+name__v%3D+%27F22611234--6764%27++LIMIT+1000+OFFSET+0' in 925 milliseconds.</pre>
</div>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>API Limit Threshold (API 制限しきい値)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>[Burst API Limit Profile (バースト API 制限プロファイル)]</strong>​ の Veeva Vault API 制限しきい値。指定された制限に達するか超えた場合、コネクタは指定された時間待機します。デフォルトは ​<code>200</code>​ です。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Wait Time (待機時間)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>[API Limit Threshold (API 制限しきい値)]</strong>​ に達するか超えた場合にコネクタが待機する時間。デフォルトは ​<code>5</code>​ です。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Time Unit (時間単位)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>待機時間の時間単位。デフォルトは ​<code>MINUTES</code>​ です。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Daily API Limit Profile (1 日の API 制限プロファイル)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Veeva Vault API の 1 日の API 制限が、設定されたしきい値に達するか超えた場合に使用される [Daily API limit exceed profile (1 日の API 制限超過プロファイル)] 設定。1 日の制限とは、任意の 24 時間枠内の総 API コール数です。<br></p>
</div>
<div class="paragraph">
<p>次の例は、​<code>2019-06-06 10:47:31,698</code>​ の警告メッセージと ​<code>2019-06-06 10:47:31,699</code>​ のエラーメッセージが含まれているアプリケーションログを示しています。</p>
</div>
<div class="listingblock">
<div class="content">
<pre>WARN 2019-06-06 10:47:31,698 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Veeva Daily API Limit remaining calls [10000] has exceeded/reached an Daily API Limit Profile threshold set as [10000]. As per API Limit Profile, Veeva Vault Connector will throw an exception.

ERROR 2019-06-06 10:47:31,699 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Exception caught while processing Sync request ::: https://xxxxx-xxxxx.veevavault.com/api/v20.1/metadata/vobjects/site__v, Exception ::: \{"responseStatus":"FAILURE","errors":[\{"type":"API_LIMIT_EXCEED","message":"The Veeva Vault Connector has reached/exceeded daily API limit remaining calls [10000]. The configured daily api limit threshold is \(10000\)"}\]}

ERROR 2019-06-06 10:47:31,767 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler:

**********************************************************************************

Message : An error occurred from the Veeva Vault API.
Error Code: API_LIMIT_EXCEED.
Original Error Message: The Veeva Vault Connector has reached/exceeded daily API limit remaining calls [10000]. The configured daily api limit threshold is (10000).
Error type : VEEVAVAULT:API_LIMIT_EXCEED

**********************************************************************************</pre>
</div>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>API Limit Threshold (API 制限しきい値)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>[Daily API Limit Profile (1 日の API 制限プロファイル)]</strong>​ の Veeva Vault API 制限しきい値。指定された制限に達するか超えた場合、コネクタは指定された時間待機します。デフォルトは ​<code>10000</code>​ です。</p>
</div></div></td>
</tr>
</tbody>
</table>

次の画像は、​**\[Advanced (詳細)\]**​ タブでの基本認証の設定例を示しています。

![「Advanced (詳細)」 タブで入力される基本認証の認証項目](/mulesoft/current/ja-jp/veevavault-connector/1.3/_images/basic-auth-adv.png)

## [](#view-app-log)アプリケーションログの表示

問題を確認するため、アプリケーションログを次の方法で表示できます。

- アプリケーションを Anypoint Platform から実行している場合、アプリケーションログ出力は Anypoint Studio のコンソールウィンドウに表示されます。
- コマンドラインから Mule を使用してアプリケーションを実行している場合、アプリケーションログ出力はオペレーティングシステムのコンソールに表示されます。

アプリケーションのログファイル (​`log4j2.xml`​) でログファイルパスがカスタマイズされていない場合、デフォルトの場所 ​`MULE_HOME/logs/<app-name>.log`​ でアプリケーションログにアクセスすることもできます。ログパスは、アプリケーションログファイル ​`log4j2.xml`​ で設定できます。

## [](#次のステップ)次のステップ

[「追加設定情報」](https://docs.mulesoft.com/jp/veevavault-connector/1.3/veevavault-connector-config-topics)​で、詳細な設定手順を参照してください。

## [](#関連情報)関連情報

- [Anypoint Connector の概要](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Anypoint Studio を使用したコネクタの設定](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)
- [Veeva Vault Connector リファレンス](https://docs.mulesoft.com/jp/veevavault-connector/1.3/veevavault-connector-reference)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)