最初に、eMatrix をセットアップし、eMatrix ビジネス・オブジェクト・タイプを作成します。
最初に、コンピューター・システムのパーツを表すタイプを定義します。これを行うには、以下のステップを実行します。
#BEGIN #1. create the attributes add attribute "component cost" type real; add attribute "in stock" type boolean; add attribute "date available" type date; add attribute "component manufacturer" type string; add attribute megahertz type integer; add attribute slot type integer; #2. create the types add type bundle; add type computer; add type cpu attribute "component cost" attribute "in stock" attribute "date available" attribute "component manufacturer" attribute megahertz; add type "network card" attribute "component cost" attribute "in stock" attribute "date available" attribute "component manufacturer"; add type "usb 2.0 card" attribute "component cost" attribute "in stock" attribute "date available" attribute "component manufacturer"; add type "sound card" attribute "component cost" attribute "in stock" attribute "date available" attribute "component manufacturer"; add type "sound chip" attribute "component cost" attribute "in stock" attribute "date available" attribute "component manufacturer" attribute megahertz;
#3. create the relationships add relationship "bundle to computer"' to type computer cardinality n from type bundle cardinality n; add relationship "computer to pci component" to type "network card", "sound card", "usb 2.0 card" cardinality n from type computer cardinality 1 attribute slot; add relationship "sound card to sound chip" to type "sound chip" cardinality 1 from type "sound card" cardinality 1;
#4. create policy add policy "computer manufacturing" type bundle, computer, cpu, "network card", "usb 2.0 card", "sound card", "sound chip" state "pre production" state "ready for production"; #5. create vault add vault "wbi computer manufacturer"; #6. create the "adapter" person add person adapter password wbia type business, system access all admin all; #END
上述のステップ 6 では、システム内のすべての操作を実行する権限をユーザー "adapter" に与えています。この例を実行するために、これらの特権がすべて必要というわけではありません。以下の MQL コマンドは、必要な特権をすべて提供します。
add person adapter password wbia type business access all admin none;
ただし、これらのサンプルで取り上げられていない作業のために eMatrix アダプターを使用する場合、ステップ 6 で提供される特権が必要となることがあります。
次に、仮定上のコンピューター・メーカーのコンピューター・システムを表すデータを作成します。これを行うには、以下のステップを実行します。
#business objects add bus bundle "home office and entertainment" 1 policy "computer manufacturing" vault "wbi computer manufacturer"; add bus computer "gamer deluxe" 1 policy "computer manufacturing" vault "wbi computer manufacturer"; add bus cpu "max processor" 1 policy "computer manufacturing" vault "wbi computer manufacturer" megahertz 2000 "in stock " true 'date available " 9/30/01 "component manufacturer" acetech "component cost " 67; add bus "sound card" "super sonic" 1 policy "computer manufacturing" vault "wbi computer manufacturer" "in stock " false "date available" 6/12/03 "component cost" 50 "component manufacturer" "feedback inc."; add bus "sound chip" "super sound chip" 1 policy "computer manufacturing" vault "wbi computer manufacturer" "component manufacturer" ChipsWeMake megahertz 100; add bus "usb 2.0 card" "usb enabler" 1 policy "computer manufacturing" vault "wbi computer manufacturer" "in stock" ' true "date available " 2/10/02 "component manufacturer" usbworks "component cost" 12; add bus "network card" "net connector" 1 policy "computer manufacturing" vault "wbi computer manufacturer" "in stock " true "date available " 8/12/02 "component cost"' 10 "component manufacturer" "tcp specialists"; #relationships connect bus bundle "home office and entertainment" 1 relationship "bundle to computer" to computer "gamer deluxe" 1; connect bus computer "gamer deluxe" 1 relationship "computer to pci component" to "sound card" "super sonic" 1 slot 1; connect bus computer "gamer deluxe" 1 relationship "computer to pci component" to "usb 2.0 card" "usb enable" 1 slot 2; connect bus "sound card" "super sonic" 1 relationship "sound card to sound chip" to "sound chip" "super sound chip" 1;
2 つの JPO をインストールする必要があります。1 つは WebSphere Business Integration Server Express イベントを作成し、イベント・タイプを保存するためのもので、もう 1 つはイベント検出時にトリガーとして動作するものです。
同じステップを実行して、InstallEventTables プログラムを実行します。ただし以下の点が異なります。
このセクションでは、仮定上のコンピューター設計に変更があったこと検出するトリガーを作成します。'computer to pci component' 関係においてトリガーを作成します。これを行うには、以下のステップを実行します。
-method recordEvent ${FROMOBJECTID} n=wbi_computer_poll v=Update
シナリオのインストールの最後のステップは、イベント・ビジネス・オブジェクトのインストールです。これを行うためには、MQL コマンド行から次のコマンドを実行します。
exec program InstallEventTables;
最初に、eMatrix Connector を構成します。これを行うには、以下のステップを実行します。
RepositoryDirectory property = %SAMPLE_FOLDER%¥repos PollFrequency property = key
RepositoryDirectory = %SAMPLE_FOLDER%¥repos
アダプターがビジネス・オブジェクトを使用するためには、まずビジネス・オブジェクトをサポートする必要があります。使用するビジネス・オブジェクトをサポートするには、以下のステップを実行します。
このサンプル・シナリオでは、ご使用のキュー・マネージャー内でいくつかのキューを定義する必要があります。必要なキューを作成するには、コマンド行から
RUNMQSC crossworlds.queue.manager
と入力し、以下のコマンドを発行します。
DEFINE QL("ADMININQUEUE") DEFINE QL("ADMINOUTQUEUE") DEFINE QL("DELIVERYQUEUE") DEFINE QL("FAULTQUEUE") DEFINE QL("REQUESTQUEUE") DEFINE QL("RESPONSEQUEUE") DEFINE QL("EMATRIXCONNECTOR/RESPONSEQUEUE") DEFINE QL("SYNCHRONOUSREQUESTQUEUE") DEFINE QL("SYNCHRONOUSRESPONSEQUEUE") DEFINE QL("PORTCONNECTOR/SYNCHRONOUSREQUESTQUEUE") DEFINE QL("PORTCONNECTOR/SYNCHRONOUSRESPONSEQUEUE")
start_eMatrix.bat または start_eMatrix.sh ファイル (プラットフォームによって異なる) を開き、これらのファイル中で EMADK および EM_LIB 変数を設定して、始動スクリプトを更新します。