https://blogs.oracle.com/integration/how-to-invoke-an-integration-from-another-integration-in-oic-without-creating-a-connection
このエントリでは、Oracle Integration Cloudの”Local Integration”機能をご紹介します。この機能は別の統合(Integration)から統合を呼び出す、というものです。この新機能の登場により、呼び出したい統合のための接続(Connection)を明示的に作成する必要がなくなります。この機能を利用するにあたっては、"oic.ics.console.integration.invoke.local.integration" という機能フラグを有効にする必要があります。
Enabling the Future Today - Feature Flags in Oracle Integration Cloud
https://blogs.oracle.com/integration/enabling-the-future-today-feature-flags-in-oracle-integration-cloud
https://orablogs-jp.blogspot.com/2018/09/enabling-future-today-feature-flags-in.html
"Hello World" という統合を呼び出すために、 Invoke Hello World という新規の統合を作成していきます。この統合"Hello World"はサンプルとしてOICに同梱されています。サンプル”Hello World"に関する詳細は、以下のドキュメントをご覧ください。
Oracle® Cloudまず、統合Hello Worldをアクティブ化した上で、以下の手順に従い、統合”Invoke Hello World"を作成します。
Using Integrations in Oracle Integration Cloud
Run the Hello World Sample
https://docs.oracle.com/en/cloud/paas/integration-cloud/integrations-user/run-sample-integrations.html#GUID-C0B79130-B9FD-4BAC-8393-B5BD6D1A6930
- 統合リストのページで[作成]をクリックし、[アプリケーションドリブンのオーケストレーション]を選択します。統合の名前は"Invoke Hello World"として統合を作成していきます。

- RESTトリガーを作成します。このトリガーはnameとemailをパラメータとして利用するため、トリガーとして"Sample REST Endpoint Interface"をDrag & Dropするか、もしくはインラインメニューを使って追加し、ウィザードに沿って進めていきます。
Use Inline Menu to add actions in Orchestration: Quickly and Easily
"Sample REST Endpoint Interface"接続はすでにシステム上に存在しているはずです。
https://blogs.oracle.com/integration/use-inline-menu-to-add-actions-in-orchestration:-quickly-and-easily





- トラッキング・フィールドを構成します。トラッキングフィールドの名前を追加してください。詳細は、以下のドキュメントを参照してください。
Oracle® Cloud
Using Integrations in Oracle Integration Cloud
Assign Business Identifiers for Tracking Fields
https://docs.oracle.com/en/cloud/paas/integration-cloud/integrations-user/create-orchestrated-integrations.html#GUID-78188DC6-AE1E-474C-A3C4-A46B473C05E8

Drag and Drop Local Integration
- Integration Artifactsをクリックして、Business Integrationをクリックし、統合のRest Trigger (getNameAndEmail)の後ろに”Local Integration"をDrag & Dropします。

- Local Integration ウィザードが現れるので、詳細を指定して[次]をクリックします。

- このページでは、呼び出し可能なアクティブ化済みの全ての統合がリスト表示されています。統合の名称を入力して統合リストをフィルタリングできます。”Hello World (1.2.0) "を選択して[次]をクリックします。

- Operationを選択して[次]をクリックします。

- サマリのページで[完了]をクリックします。

- ここから、マップ ”CallHelloWorld" を編集して、nameとemailをマッピングしていきます。

- マップ "getNameAndEmail" を構成、編集します。

- 統合を保存して閉じます。

- ランディングページから、統合をアクティブ化します。トレース、ペイロードのトレースも有効化します。
- エンドポイントURLを使って統合を実行します。URLをブラウザに貼り付けて、実行してください。URLは以下のような形式です。
https://host/ic/api/integration/v1/flows/rest/INVOKE_HELLO_WORLD/1.0/info?name=[name-value]&email=[email-value]
- モニタリング>トラッキングと辿って、統合の実行を監視します。Invoke Hello Worldという統合からのHello Worldの呼び出しに成功していることが確認できるでしょう。このページからHello Worldインスタンスの実行結果に遷移することもできます。Local Integration ”CallHelloWorld" をクリックして、 "Go to Local Integration instance.." アイコンを選択します。ポップアップが現れるので、”Go” をクリックすると、Hello Worldインスタンスが新しいタブページに現れます。この機能はRESTもしくはSOAPベースの呼び出しのみで利用可能で、スケジュール化されたオーケストレーションでは利用できません。

How to Invoke a Scheduled Orchestration
スケジュール化されたオーケストレーションを別の統合から呼び出すこともできます。その場合は、スケジュール化されたオーケストレーションを”Submit Now" で呼び出すだけでよいのです。これから新たな統合 Invoke File Transfer を作成します。これはFile Transfer Sampleを呼び出すものです。このサンプルの詳細は以下をご覧ください。
Oracle® Cloud
Using Integrations in Oracle Integration Cloud
Run the File Transfer Sample
https://docs.oracle.com/en/cloud/paas/integration-cloud/integrations-user/run-sample-integrations.html#GUID-78E34627-C71B-48A5-8516-80C6D84FFE19
- まず、”File Transfer Sample"をアクティブ化します。続いて、スケジュール化されたオーケストレーションである"Invoke File Transfer" を作成し、Local IntegrationをDrag & Dropします。ウィザードに従って進み、”File Transfer Sample"をLocal Integrationとして選択し、Operationとして"runNow"を選択します。詳細は前章 ”Drag and Drop Local Integration” をご覧ください。その後、マップ "CallFileTransfer" を編集します。
- マッパーでは、アクションをクリックして”Build Mapping" 画面に遷移し、”NOW"と入力します。スケジュール化されたオーケストレーションを起動するにあたり、これが重要な手順です。


- トラッキングを構成し、統合を保存、終了します。
- Activate the "Invoke File Transfer" をアクティブ化し、メニューからSubmit Nowをクリックして統合を実行します。Monitoring > Runsと辿ると、実行状況を確認できます。下図のスクリーンショットから分かるように、"Invoke File Transfer" が動作し、File Transfer Sampleが呼び出されています。

このエントリでは、別の統合を呼び出す ”Local Integration" 機能の利用方法をご紹介しました。より良い設計を促進し、メンテナンスを容易にするためにモジュール機能を提供するこのパターンを利用して、大規模な統合を複数の小規模な統合に分割するのよい考え方、方法と考えます。
0 件のコメント:
コメントを投稿