LocalEnvironment ツリーの Destination へのデータの取り込み

Destination サブツリーを使用して、出力ノード、HTTPRequest ノード、SOAPRequest ノード、SOAPAsyncRequest ノード、および RouteToLabel ノードで使用されるターゲット宛先をセットアップします。以下の例は、ESQL プロシージャーを作成およびそれを使用して、それぞれの使用における値のセットアップというタスクを実行する方法を示しています。

これらのプロシージャーをコピーし、示されているとおりに使用するか、あるいはそれらを変更または拡張して同様のタスクを実行できます。

MQOutput ノードでのキュー名の追加
CREATE PROCEDURE addToMQDestinationList(IN LocalEnvironment REFERENCE, IN newQueue char) BEGIN
  /*******************************************************************************
  * A procedure that adds a queue name to the MQ destination list in the local environment.
  * This list is used by an MQOutput node that has its mode set to Destination list.
  *
  * IN LocalEnvironment: the LocalEnvironment to be modified. 
  * Set this value to OutputLocalEnvironment when calling this procedure
  * IN queue: the queue to be added to the list
  *
  *******************************************************************************/
  DECLARE I INTEGER CARDINALITY(LocalEnvironment.Destination.MQ.DestinationData[]);
		IF I = 0 THEN
			SET LocalEnvironment.Destination.MQ.DestinationData[1].queueName = newQueue;
		ELSE
			SET LocalEnvironment.Destination.MQ.DestinationData[I+1].queueName = newQueue;
		END IF;
	END;
HTTPRequest ノード要求のデフォルト URL の変更
CREATE PROCEDURE overrideDefaultHTTPRequestURL(IN LocalEnvironment REFERENCE, IN newUrl char) BEGIN
  /*******************************************************************************
  * A procedure that changes the URL to which the HTTPRequest node sends the request.
  * 
  * IN LocalEnvironment: the LocalEnvironment to be modified. 
  * Set this value to OutputLocalEnvironment when calling this procedure
  * IN queue: the URL to which to send the request.
  *
  *******************************************************************************/
  set LocalEnvironment.Destination.HTTP.RequestURL  = newUrl;
END;
RouteToLabel ノードのラベルの追加
CREATE PROCEDURE addToRouteToLabelList(IN LocalEnvironment REFERENCE, IN newLabel char) BEGIN
  /*******************************************************************************
  * A procedure that adds a label name to the RouteToLabel list in the local environment.
  * This list is used by a RoteToLabel node.
  *
  * IN LocalEnvironment: the LocalEnvironment to be modified. 
  * Set this value to OutputLocalEnvironment when calling this procedure
  * IN label:  the label to be added to the list
  *
  *******************************************************************************/
	if LocalEnvironment.Destination.RouterList.DestinationData is null then
     set LocalEnvironment.Destination.RouterList.DestinationData."label" = newLabel;
  else
     create LASTCHILD OF LocalEnvironment.Destination.RouterList.DestinationData
     NAME 'label' VALUE newLabel; 
  end if;
END;
関連概念
メッセージ・フローの概要
ローカル環境のツリー構造
関連資料
Compute ノード
DestinationData サブツリー内のエレメントのデータ・タイプ
CREATE PROCEDURE ステートメント
SET ステートメント
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
最終更新 : 2009-02-20 12:42:53

ac16862_