---
schema_version: "1"
id: 319381a1d5cae9fc0339e95d42486fcbb7d3fd1f0cd4c16c7653123fc3fd9d56
title: Anypoint Studio を使用した ServiceNow Connector の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/servicenow-connector/6.6/servicenow-connector-studio.md
canonical_url: https://docs.mulesoft.com/jp/servicenow-connector/6.6/servicenow-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b027d506743423bec732e8d304b77490427b75003dac4db85285d7ffcfee852d
description: MuleSoft Documentation Site
release: "6.6"
latest: false
---
# Anypoint Studio を使用した ServiceNow Connector の設定

Studio のエディターは、Mule アプリケーション、プロパティ、および設定ファイルをデザインして更新するのに便利です。

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

1. Mule プロジェクトを作成します。
2. Anypoint Platform に認証ログイン情報を提供します。
3. コネクタを Mule プロジェクトに追加します。
4. コネクタのフローの入力元を設定します。
5. コネクタを設定します。

## [](#ベストプラクティス)ベストプラクティス

Studio で入力元とコネクタを設定するときに、次のベストプラクティスに従います。

- 入力元とコネクタに関連するグローバル要素を設定します。
- プロパティを含む YAML ファイルまたはプロパティファイルを作成し、設定からファイルを参照します。
- 入力元と対象コネクタの再接続戦略を設定します。

## [](#プロジェクトへのコネクタの追加)プロジェクトへのコネクタの追加

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

1. Studio で Mule プロジェクトを作成します。
2. **\[Mule Palette (Mule パレット)\]**​ ビューで、​**\[(X) Search in Exchange ((X) Exchange 内を検索)\]**​ をクリックします。
3. **\[Add Modules to Project (モジュールをプロジェクトに追加)\]**​ で、検索項目に「servicenow」と入力します。
4. **\[Available modules (使用可能なモジュール)\]**​ で \[ServiceNow Connector\] 名をクリックします。
5. **\[Add (追加)\]**​ をクリックします。
6. **\[Finish (完了)\]**​ をクリックします。

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

## [](#コネクタの設定)コネクタの設定

ServiceNow Connector は、基本認証と OAuth2 認証をサポートします。​**\[Connection (接続)\]**​ ドロップダウンリストから、使用する認証種別を選択します。

![基本認証が選択されているグローバル要素の接続設定](/mulesoft/current/ja-jp/servicenow-connector/6.6/_images/servicenow-studio-connection-6.6.0.png)

### [](#基本認証)基本認証

1. ServiceNow 設定の ​**\[General (一般)\]**​ タブで、​**\[Connection (接続)\]**​ ドロップダウンリストから ​**\[Basic Authentication (基本認証)\]**​ を選択します。
2. 次の基本認証の値を入力します。

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</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>Username (ユーザー名)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ServiceNow にログインするための名前</p></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"><p class="tableblock">ユーザー名に対応するパスワード</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Service Address (サービスアドレス)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">WSDL エンドポイント</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ServiceNow Version (ServiceNow バージョン)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">使用する ServiceNow バージョン</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>User table list (ユーザーテーブルリスト)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ログインするユーザーのカスタムテーブル</p></td>
</tr>
</tbody>
</table>

#### [](#basic-authentication-http-message-dispatcher-provider-基本認証-http-メッセージディスパッチャープロバイダー)Basic Authentication HTTP Message Dispatcher Provider (基本認証 HTTP メッセージディスパッチャープロバイダー)

1. **\[Transport (トランスポート)\]**​ タブをクリックします。
2. **\[Transport Configuration (トランスポート設定)\]**​ で ​**\[Basic auth http message dispatcher provider (基本認証 HTTP メッセージディスパッチャープロバイダー)\]**​ を選択します。
3. 次の必須値を入力します。

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</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>User Name (ユーザー名)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ServiceNow にログインするための名前</p></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"><p class="tableblock">ユーザー名に対応するパスワード</p></td>
</tr>
</tbody>
</table>

#### [](#basic-authentication-http-requester-based-transport-provider-基本認証の-http-リクエスターベースのトランスポートプロバイダー)Basic Authentication HTTP Requester Based Transport Provider (基本認証の HTTP リクエスターベースのトランスポートプロバイダー)

1. **\[Transport (トランスポート)\]**​ タブをクリックします。
2. **\[Transport Configuration (トランスポート設定)\]**​ で ​**\[Http requester based transport provider (基本認証の HTTP リクエスターベースのトランスポートプロバイダー)\]**​ を選択します。
3. **\[Requester config (リクエスター設定)\]**​ を選択するか、または、緑色のプラス記号をクリックして新しく作成します。
    
    ![基本認証の \[Transport Configuration (トランスポート設定)\] タブ](_images/servicenow-studio-requester-config.png)
4. 必須値を入力します。

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</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>Host (ホスト)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">WSDL エンドポイント</p></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"><p class="tableblock">ServiceNow にログインするためのユーザー名</p></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"><p class="tableblock">ユーザー名に対応するパスワード</p></td>
</tr>
</tbody>
</table>

### [](#oauth2-0-認証)OAuth2.0 認証

1. ServiceNow 設定の ​**\[General (一般)\]**​ タブで、​**\[Connection (接続)\]**​ ドロップダウンリストから ​**\[OAuth 2.0 Authorization Code (OAuth 2.0 認証コード)\]**​ を選択します。
2. OAuth 接続の値を指定します。

![OAuth 2.0 認証コードによる認証を設定するための \[General (一般)\] タブ](_images/servicenow-oauth.png)

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</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>Service Address (サービスアドレス)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ServiceNow のインスタンスエンドポイント。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Consumer key (コンシューマーキー)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">登録されているアプリケーションのクライアント ID。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Consumer secret (コンシューマーシークレット)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">登録されているアプリケーションのクライアントシークレット。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Authorization url (認証 URL)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">OAuth ダンスを開始するためのエンドポイント。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Access token url (アクセストークン URL)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">アクセストークンを取得するためのエンドポイント。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Listener config (リスナー設定)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">HTTP リスナーの設定。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Callback path (コールバックパス)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">アクセストークンコールバックエンドポイントのパス。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Authorize path (認証パス)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">OAuth ダンスをトリガーするローカル HTTP エンドポイントのパス。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>External callback url (外部コールバック URL)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">コールバックエンドポイントがプロキシの背後にあるか、直接 URL 以外でアクセスする必要がある場合、このパラメーターを使用して、OAuth プロバイダーがコールバックへのアクセスに使用する必要のある URL を指定します。</p></td>
</tr>
</tbody>
</table>

## [](#入力元の設定)入力元の設定

ServiceNow の操作は入力元としては使用できないため、​**HTTP リスナー**​や​**スケジューラー**​コンポーネントを使用して入力元を設定する必要があります。

- **HTTP リスナー**​  
    ブラウザーまたは ​`curl`​ などのコマンドを使用してアプリケーションを開始します。
- **スケジューラー**​  
    指定された間隔でアプリケーションを開始します。

Studio で、選択した入力操作を ​**\[Mule Palette (Mule パレット)\]**​ からキャンバスにドラッグします。

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

ServiceNow Connector を Studio で設定したら、​[「例」](https://docs.mulesoft.com/jp/servicenow-connector/6.6/servicenow-connector-examples)​を参照してコネクタを試してください。

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

- [Anypoint Connector の概要](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)