# 連携タイミングの設定

## **連携タイミングの設定**

データを連携するタイミングは、「リアルタイム連携」 もしくは 「非同期連携（一定時間間隔で連携）」 のいずれかを選択できます。

{% hint style="warning" %}
「非同期連携（一定時間間隔で連携）」は ConMas Manager バージョン 8.1.25050 以降で設定できます。\
バージョン 8.1.25020 以前 のConMas Managerでは、連携タイミングは 「リアルタイム連携」のみです。
{% endhint %}

### **ConMas Managerでの設定**

「MotionBoardCloud連携設定」画面 ＞ 「リアルタイム連携」で設定します。

<div align="left"><figure><img src="/files/lN6cKooQ0JZxbzEUQcRc" alt="" width="375"><figcaption></figcaption></figure></div>

* **する：**\
  i-Reporterアプリから入力帳票をサーバー保存したタイミングで、MotionBoardへデータが連携されます。\
  リアルタイムでMotionBoardへデータを連携できる一方で、i-Reporterアプリからの入力帳票保存処理速度が遅くなる可能性があります。

  <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>「リアルタイム連携：する」と設定した場合でも、「非同期連携（一定時間間隔で連携）」は行われます。</p><ul><li><strong>「削除データ」の反映は「非同期連携」処理によって連携されます。</strong></li><li>「リアルタイム連携」に失敗したデータは「非同期連携」処理によって自動的にMotionBoardへ再連携されます。</li></ul><p>「非同期連携」を「しない」設定にはできません。<br>「リアルタイム連携：する」と設定した場合は、「リアルタイム連携」と「非同期連携」が両方とも実行されます。</p></div>

  <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>【オンプレミス版をご利用の場合】<br>下記条件を満たした場合に、「非同期連携」が実行されます。</p><p>・ConMas Manager 8.1.25050 以降<br>・Windowsサービスプログラム「IRService」をインストールし、正しく設定している。</p></div>

  \
  &#x20;
* **しない：**\
  &#x20;「非同期連携（一定時間間隔）」 でMotionBoardへデータを連携します。\
  i-Reporterアプリからの入力帳票保存処理 と MotionBoardへのデータ連携処理 が別々のタイミングで実行されるため、「リアルタイム連携：する」の設定と比較して、i-Reporterアプリからの入力帳票保存処理速度が速くなります。

### **非同期連携を実行するための設定**

クラウド版とオンプレミス版で、必要な設定作業が異なります。

**クラウド版をご利用の場合**

お客様にて特別な設定作業は必要ありません。\
「連携タイミングの設定 ＞ [ConMas Managerでの設定](#conmas-managerdeno)」 を行うだけでご使用いただけます。

{% hint style="warning" %}
クラウド版では、 「非同期連携」は 5分に1回実行する設定になっています。\
実行間隔を変更することはできません。
{% endhint %}

**オンプレミス版をご利用の場合**

「連携タイミングの設定 ＞ [ConMas Managerでの設定](#conmas-managerdeno)」 に加えて、次に記載する「[i-Reporter サーバー上の設定](#i-reporter-sbno)」を参考に、サーバー（APサーバー）上にWindowsサービスプログラム「IRService」をインストールしてください。\
設定はお客様にて細かく変更できます。

### **i-Reporter サーバー上の設定**

サーバー（APサーバー）上にWindowsサービスプログラム「IRService」をインストールします。

{% hint style="warning" %}
オンプレミス版、サブスクリプション版をご使用のお客様のみ、必要な手順です。
{% endhint %}

【手順】

1. サポートWEBより、「IRService.zip」をダウンロードします。

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>▼サポートWEB <br>　＞ <a href="https://cimtops-support.com/i-Reporter/ja/software-jp">ソフトウェア</a> ＞ Windowsサービスプログラム IRService X.X.X</p><p>※X.X.X 部分にはバージョンが入ります。<br>※MotionBoard非同期連携を行うには、Windowsサービスプログラム IRService バージョン 1.1.0 以降が必要です。</p></div>

   <br>

2. サーバー上の任意の場所にIRService.zipを解凍し、フォルダ「IRService」を以下の場所に配置します。 　　　`[ConMasフォルダ]\IRService`<br>

3. `[ConMasフォルダ]\IRService\IReporterService.exe.config`\
   をメモ帳で開きます。

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>上記ファイルがない場合は 手順２. にて配置場所が間違っていますので、正しく配置してください。</p></div>

4. IReporterService.exe.config 内の `<!-- postgreSQL接続先設定 -->` の記述を、環境に合わせて修正し保存します。\
   “Password=”の箇所には、PostgreSQLのpostgresユーザーパスワードをセットしてください。

   <div align="left"><figure><img src="/files/IYUNDxm9K6DsbbBKdm7n" alt=""><figcaption><p>ダウンロードした時点では、サンプルとして“cimtops”というパスワードが入力されています。この箇所を修正してください。</p></figcaption></figure></div>

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Database={dbName}は触らないようにしてください。</p></div>

   `<!-- アプリケーション配置ドライブ -->` の“value=”には、ConMasフォルダーの配置ドライブをセットします。

   <div align="left"><figure><img src="/files/WvDI5G56nuGRDSMd46Im" alt=""><figcaption><p>こちらは、Cドライブ直下にConMasフォルダに配置している場合の例です。</p></figcaption></figure></div>

5. 解凍したフォルダ内の「IRServiceInstall.ps1」をメモ帳で開きます。<br>

6. 「IRServiceInstall.ps1」内の下記記述を、環境に合わせて修正し保存します。

   “\[ConMasフォルダパス]”の箇所には、ConMasフォルダーのパスをセットしてください。

   <div align="left"><figure><img src="/files/GeQTTs3fdvPbX8GyyJUQ" alt=""><figcaption><p>こちらは、Cドライブ直下にConMasフォルダに配置している場合の例です。</p></figcaption></figure></div>

7. 「IRServiceInstall.ps1」を、PowerShellで実行します。\
   右クリック ＞ 「PowerShellで実行」をクリックします。実行には管理者権限が必要です。

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>「IRServiceInstall.ps1」を実行するには、PowerShell 7.2 以降が必要です。<br>Microsoft公式サイトよりMSIファイルをダウンロードしてインストールをお願いします。</p></div>

8. 実行後 Windowsサービスを起動し、IRIWServiceが実行中であることを確認します。

   <div align="left"><figure><img src="/files/6ouoEutgMGgEvQeAVRzz" alt=""><figcaption></figcaption></figure></div>

このサービスプログラムの実行タイミングは分単位で、定期実行されます。\
実行間隔は以下で設定できます。

【実行間隔の設定手順】

`[ConMasフォルダ]\IRService\IReporterService.exe.config`\
をメモ帳で開き、任意の設定値をセットします。

<div align="left"><figure><img src="/files/4BhjrupZTiFEi9NdgMpa" alt="" width="541"><figcaption></figcaption></figure></div>

* **実行間隔（分）：**\
  定期実行間隔です。分単位での設定になります。最小値は1です。

{% hint style="warning" %}
【注意】

「実行間隔」以外は変更しないでください。
{% endhint %}

{% hint style="info" %}
Windowsサービスプログラム”IRService”のバージョンアップを行う際は、「[IRService 更新手順](/output-the-data/motionboard-cloud/irservice-update.md)」 をご確認ください。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manuals.i-reporter.jp/output-the-data/motionboard-cloud/setting-the-collaboration-timing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
