> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Branch Connector

> Routes messages along different flow paths based on configurable conditions, supporting filename, header, XPath, and EDI metadata comparisons.

export const NameDescription = ({extraRows}) => <table>
    <thead>
      <tr>
        <th>設定</th>
        <th>説明</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>Connector Id</strong></td>
        <td>コネクタの静的で一意の識別子です。</td>
      </tr>
      <tr>
        <td><strong>Connector Type</strong></td>
        <td>コネクタ名とその機能の説明を表示します。</td>
      </tr>
      <tr>
        <td><strong>Connector Description</strong></td>
        <td>コネクタおよびフロー内でのその役割について自由形式の説明を提供するためのオプションフィールドです。</td>
      </tr>
      {extraRows}
    </tbody>
  </table>;

export const SlasTab = ({siteName = "CData Arc"}) => <>
    <p><em>サービスレベルアグリーメント（SLA）の設定に関する設定です。</em></p>
    <p>
      SLA を使用すると、フロー内のコネクタが送受信すると見込まれるボリュームを設定し、そのボリュームを達成すると見込まれる期間を設定できます。{siteName} は、SLA が達成されない場合にユーザーへ警告するメールを送信し、SLA を<em>At Risk</em> としてマークします。これは、SLA が間もなく達成されない場合に<em>Violated</em> としてマークされることを意味します。これにより、ユーザーは介入してSLA が達成されない理由を特定し、適切な対応を取る機会を得られます。At Risk 期間の終了時点でもSLA が達成されない場合、SLA はviolated としてマークされ、ユーザーに再度通知されます。
    </p>
    <p>
      SLA を定義するには、<strong>Expected Volume</strong> をオンに切り替え、<strong>Settings</strong> タブをクリックします。
    </p>
    <img src="/public/images/sla_empty.png" alt="SLA Empty" />
    <ul>
      <li>コネクタに送信と受信の個別のアクションがある場合は、ラジオボタンを使用してSLA がどちらの方向に適用されるかを指定します。</li>
      <li>ウィンドウの<strong>Expect at least</strong> 部分で、次を設定します。
        <ul>
          <li>処理を見込む最小トランザクション数（ボリューム）を設定します。</li>
          <li><strong>Every</strong> フィールドを使用して期間を指定します。</li>
          <li>SLA を有効にするタイミングを指定します。<strong>Starting on</strong> を選択した場合は、日付および時刻フィールドを入力します。</li>
          <li>SLA を有効にしたい曜日のチェックボックスをオンにします。必要に応じて、ドロップダウンで<strong>Everyday</strong> を選択します。</li>
        </ul>
      </li>
      <li>ウィンドウの<strong>Set status to 'At Risk'</strong> 部分で、SLA をAt Risk としてマークするタイミングを指定します。
        <ul>
          <li>デフォルトでは、SLA が違反状態になるまで通知は送信されません。これを変更するには、<strong>Send an 'At Risk' notification</strong> をオンにします。</li>
        </ul>
      </li>
    </ul>
    <p>
      次の例は、月曜日から金曜日まで毎日1000 件のファイルを受信すると見込むコネクタ向けに設定されたSLA を示しています。1000 件のファイルが受信されていない場合、期間の終了の1時間前にAt Risk 通知が送信されます。
    </p>
    <img src="/public/images/sla_defined.png" alt="SLA Configuration Example" />
    <Note>
      必要に応じてSLA アラートをオフにすることができます。これはメンテナンスウィンドウ中に役立ちます。navbar で<strong>Settings</strong> をクリックし、<strong>Alerts &gt; General Alerts</strong> に移動します。タブレットと鉛筆のアイコンをクリックして編集し、<strong>SLA Alerts</strong> 設定のチェックを外します。
    </Note>
  </>;

export const AlertsTab = ({siteNameShort = "Arc"}) => <>
    <p><em>アラートの設定に関する設定です。</em></p>
    <p>
      サービスレベルアグリーメント（SLA）を実行する前に、通知用のメールアラートをセットアップする必要があります。デフォルトでは、{siteNameShort} は<a href="/26.2/self-hosted/ja/getting-started/administration/settings/alerts">Alerts</a> タブのグローバル設定を使用します。このコネクタに別の設定を使用するには、<strong>Override global setting</strong> をオンに切り替えます。
    </p>
    <p>
      デフォルトではエラーアラートが有効になっており、エラーが発生するたびにメールが送信されます。これをオフにするには、<strong>Enable</strong> チェックボックスのチェックを外します。
    </p>
    <p>
      <strong>Subject</strong>（必須）を入力し、必要に応じて<strong>Recipient</strong> のメールアドレスをカンマ区切りのリストで入力します。
    </p>
  </>;

export const Message = () => <>
    <p><em>Message 設定は、コネクタがメッセージを検索する方法と、処理後にメッセージを管理する方法を決定します。</em></p>
    <table>
      <thead>
        <tr><th>設定</th><th>説明</th></tr>
      </thead>
      <tbody>
        
          <tr>
            <td><strong>Save to Sent Folder</strong></td>
            <td>コネクタが処理したファイルをコネクタのSent フォルダにコピーするには、これをオンにします。</td>
          </tr>
        
        <tr>
          <td><strong>Sent Folder Scheme</strong></td>
          <td>選択した間隔に従って、コネクタが<strong>Sent</strong> フォルダ内のファイルをグループ化するよう指示します。例えば、<strong>Weekly</strong> オプションは、コネクタが毎週新しいサブフォルダを作成し、その週のすべての送信済みファイルをそのフォルダに保存するよう指示します。空白の設定は、コネクタがすべてのファイルを<strong>Sent</strong> フォルダに直接保存するよう指示します。多数のトランザクションを処理するコネクタでは、サブフォルダを使用することでファイルを整理しやすくなり、パフォーマンスを向上できます。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const MiscConnector = () => <>
    <p><em>Miscellaneous 設定は、特定のユースケース向けの設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Other Settings</strong></td>
          <td>非表示のコネクタ設定をセミコロン区切りのリストで設定できます（例：<code>setting1=value1;setting2=value2</code>）。通常のコネクタのユースケースや機能では、これらの設定の使用は必要ありません。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const Logging = () => <>
    <p><em>ログの作成と保存を制御する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Log Level</strong></td>
          <td>コネクタが生成するログの詳細度です。サポートを依頼する際は、これを<strong>Debug</strong> に設定してください。</td>
        </tr>
        <tr>
          <td><strong>Log Subfolder Scheme</strong></td>
          <td>選択した間隔に従って、コネクタがLogs フォルダ内のファイルをグループ化するよう指示します。<strong>Weekly</strong> オプション（デフォルト）は、コネクタが毎週新しいサブフォルダを作成し、その週のすべてのログをそのフォルダに保存するよう指示します。この設定を空白のままにすると、コネクタはすべてのログをLogs フォルダに直接保存します。多数のトランザクションを処理するコネクタでは、サブフォルダを使用することでログを整理しやすくなり、パフォーマンスが向上します。</td>
        </tr>
        <tr>
          <td><strong>Log Messages</strong></td>
          <td>処理したファイルのログエントリにファイル自体のコピーを含めるには、これをオンにします。これを無効にすると、<strong>Transactions</strong> タブからファイルのコピーをダウンロードできなくなる場合があります。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const Performance = () => <>
    <p><em>コネクタへのリソースの割り当てに関する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Max Workers</strong></td>
          <td>このコネクタでファイルを処理するためにスレッドプールから消費されるワーカースレッドの最大数です。設定すると、<a href="/26.2/self-hosted/ja/getting-started/administration/settings/advanced-settings">Advanced Settings</a> ページの<a href="/26.2/self-hosted/ja/getting-started/administration/settings/performance-settings">Performance Settings</a> 部分にあるデフォルト設定が上書きされます。</td>
        </tr>
        <tr>
          <td><strong>Max Files</strong></td>
          <td>コネクタに割り当てられた各スレッドが送信するファイルの最大数です。設定すると、<a href="/26.2/self-hosted/ja/getting-started/administration/settings/advanced-settings">Advanced Settings</a> ページの<a href="/26.2/self-hosted/ja/getting-started/administration/settings/performance-settings">Performance Settings</a> 部分にあるデフォルト設定が上書きされます。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const siteNameShort = "Arc";

export const siteName = "CData Arc";

A Branch connector functions as a fork in the flow. Files are sent along different paths in the flow depending on whether a condition specified in the connector is true.

## Key Capabilities

* Intelligent flow routing based on configurable conditions (filename, headers, XPath, and EDI metadata)
* Support for multiple data types (such as string, number, DateTime) with flexible comparison operators
* Advanced XPath evaluation for XML document routing
* EDI-specific metadata branching for document type routing

## Overview

Branch conditions can check for these different types of values:

* the filename
* a header on the message
* all matching XPaths
* the first matching XPath
* one or more matching XPaths
* [EDI](./edi-connectors) metadata

**Notes**:

* To use the XPath options, the file being evaluated must be an XML file.
* EDI metadata branching can only be used on EDI documents.

The Branch connector configuration determines which value to look for, and the *target* values to compare against. If an incoming value matches a target value, the message is passed along a dotted blue flow path. You can have multiple target values, each of which sends the message along a different flow path. If the values do not match any of the conditions, the message is passed along the dotted gray path.

<img src="https://mintcdn.com/cdata-arc/Lo_2D5t4szDfleFN/public/images/branch_flow.png?fit=max&auto=format&n=Lo_2D5t4szDfleFN&q=85&s=234204706c83402deae65d8831b6b3fd" width="800" data-path="public/images/branch_flow.png" />

See [Branching on Message Headers](#branching-on-message-headers) for a detailed explanation of the image above.

## Connector Configuration

This section contains all of the configurable connector properties.

### Branch Config Tab

*Settings related to configuring the branch conditions.*

The branch settings allow you to specify multiple conditions for a single source value to define your branches.

<table>
  <thead>
    <tr>
      <th>Setting</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><strong>Sample File</strong></td>
      <td>If you upload a sample XML file, the connector shows the document structure when you use an XPath for comparison. An example is shown below.</td>
    </tr>

    <tr>
      <td><strong>If</strong></td>
      <td>Use the dropdown to specify what attribute to compare when messages are received. Options are: the message header, the filename, all matching XPaths, the first matching XPath, one or more matching XPaths, or EDI metadata. Once you make your selection, use the fields to the right to further define the condition, as shown in the <strong>Sample File</strong> image above.</td>
    </tr>

    <tr>
      <td><strong>Data Type</strong></td>
      <td>Whether the target value is a string, number, or DateTime. If your data type is <strong>String</strong>, use the <strong>Trim string</strong> and <strong>Ignore case</strong> checkboxes to further refine the comparison. If your data type is <strong>DateTime</strong>, use the field to the right to specify how your DateTime values are structured.</td>
    </tr>

    <tr>
      <td><strong>Trim String</strong></td>
      <td>Whether the string comparison should ignore whitespace.</td>
    </tr>

    <tr>
      <td><strong>Ignore Case</strong></td>

      <td>
        <p>Whether the string comparison should be case-sensitive.</p>

        <img src="https://mintcdn.com/cdata-arc/-adMVRA2NGLWRgFp/public/images/branch_sample_file.png?fit=max&auto=format&n=-adMVRA2NGLWRgFp&q=85&s=0442c1d62004950dc9be91a1fcc8ba26" width="400" data-path="public/images/branch_sample_file.png" />

        <p>The center portion of the branch settings section (shown in the image below) allows you to set as many conditions as you need. Hover above or below the white pane and select <strong>Add Case</strong> to add conditions.</p>

        <img src="https://mintcdn.com/cdata-arc/Lo_2D5t4szDfleFN/public/images/branch_conditions.png?fit=max&auto=format&n=Lo_2D5t4szDfleFN&q=85&s=cda0584f06735a5789bd83b69357a5ee" width="500" data-path="public/images/branch_conditions.png" />

        <p>Each condition is made up of three components:</p>

        <ul>
          <li>the operator (for example, <em>is equal to, contains, starts with,</em> or <em>matches regex</em>)</li>
          <li>the value to compare with the value found in the file</li>
          <li>the <em>Then output to</em> component</li>
        </ul>

        <p>As you create your flow, connect a different connector to each case statement in the Branch connector to establish the <em>Then output to</em> connectors. Finally, connect a different connector to the <strong>Else</strong> case to tell {siteNameShort} what to do if none of the other conditions are satisfied.</p>
      </td>
    </tr>

    <tr>
      <td><strong>Ignore Missing Values</strong></td>
      <td>Whether to treat missing headers or XPaths as an empty string (not applicable when your <strong>If</strong> selection is <em>Filename</em>). This avoids errors being thrown when an expected header or XPath is missing, and instead passes the message along the 'does not match' Flow path.</td>
    </tr>
  </tbody>
</table>

### Settings Tab

*Settings related to the core operation of the connector.*

<NameDescription />

### Advanced Tab

#### Message

<Message />

#### Logging

<Logging />

#### Other Settings

| Setting              | Description                                                                                                                                                                                                                                                                              |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Processing Delay** | The amount of time (in seconds) by which the processing of files placed in the **Transactions** tab is delayed. This is a legacy setting. Best practice is to [use a File connector](../flows/designing-a-flow#ローカルファイルシステムとのやり取り) to manage local file systems instead of this setting. |

#### Miscellaneous

<MiscConnector />

### Automation Tab

#### Automation Settings

| Setting  | Description                                                             |
| -------- | ----------------------------------------------------------------------- |
| **Send** | Whether messages arriving at the connector are automatically processed. |

#### Performance

<Performance />

### Alerts Tab

<AlertsTab />

### SLAs Tab

<SlasTab />

## Examples Using the Branch Connector

The following examples describe common Branch connector use cases.

### Branching on Message Headers

In this example, your business receives multiple types of EDI documents from a trading partner, and you need the different types to be processed differently.

<img src="https://mintcdn.com/cdata-arc/Lo_2D5t4szDfleFN/public/images/branch_flow_input.png?fit=max&auto=format&n=Lo_2D5t4szDfleFN&q=85&s=9d8c1f3a8ed327b0b19a0cb18eaed132" width="800" data-path="public/images/branch_flow_input.png" />

The image above illustrates a situation where you send a trading partner purchase orders. They then send you two different types of EDI documents: one is an 855 purchase order acknowledgement and one is an 810 invoice. The [X12 connector](./x12) before the Branch connector in the flow appends **X12-TransactionCode** to each message header.

<img src="https://mintcdn.com/cdata-arc/Lo_2D5t4szDfleFN/public/images/branch_flow.png?fit=max&auto=format&n=Lo_2D5t4szDfleFN&q=85&s=234204706c83402deae65d8831b6b3fd" width="800" data-path="public/images/branch_flow.png" />

The Branch connector uses the transaction code in the message header to tell {siteNameShort} what to do when it receives an 810 or an 855 EDI document, and what to do if it receives a document that does not have either of those transaction codes.

* When an 810 document is received, the next step in the flow sends it to the invoices table of the back-end system (PostgreSQL in this example.)
* When an 855 document is received, the next step in the flow sends it to a PO acknowledgement table in the back-end system.
* When any other type of document is received, the **Else** condition uses a [Notify connector](./notify) to send an email to an administrator for manual processing.

### Branching on EDI Metadata

In this example, your business receives X12 documents from multiple companies, and you need the documents from two companies to be sent to specific [Workspaces](../flows/workspaces) for further processing.

<img src="https://mintcdn.com/cdata-arc/Lo_2D5t4szDfleFN/public/images/branch_edimetadata.png?fit=max&auto=format&n=Lo_2D5t4szDfleFN&q=85&s=3964ab5d4fb2dacb057da4c7d8ddb177" width="800" data-path="public/images/branch_edimetadata.png" />

The image above illustrates a situation where two companies send you X12 documents. The Branch connector uses the X12 Metadata **InterchangeSenderId** to specify where the documents should be delivered.

* When a document is received from CompanyA, the next step in the flow sends it to the CompanyA workspace.
* When a document is received from CompanyB, the next step in the flow sends it to the CompanyB workspace.
* When any other type of document is received, the **Else** condition uses a [Notify connector](./notify) to send an email to an administrator alerting them that an inbound X12 document did not match one of the two expected companies.

The company-specific workspaces might then contain a [Workspace Receive](./workspace-receive) connector to receive incoming documents (required because the [Workspace Send](./workspace-send) connector was used in the Branch flow), an [X12 connector](./x12) with identifiers that enable translation of the raw X12 data into XML, an [XML Map](./xml-map/xml-map) connector to handle mapping the XML to the destination, and finally a destination connector ([PostgreSQL](./postgresql/postgresql) in the following image).

<img src="https://mintcdn.com/cdata-arc/Lo_2D5t4szDfleFN/public/images/branch_edimetadata_output.png?fit=max&auto=format&n=Lo_2D5t4szDfleFN&q=85&s=646b24c49ee37cc9bddc83d6b79c35ae" width="800" data-path="public/images/branch_edimetadata_output.png" />
