.NETCompute ノードを使ったローカル環境の更新

ローカル環境ツリーは、メッセージ・フローがメッセージを処理する際に情報を保管できる論理メッセージ・ツリーの一部です。

以下の例の C# Evaluate メソッドは .NETCompute ノードによって実行され、入力メッセージ・アセンブリーに基づいて出力メッセージ・アセンブリーを作成します。 .NETCompute ノードに入るローカル環境がコピーされ、後の MQOutput ノードの動作を動的に制御するために、DestinationList として使用できるキューの名前で更新されます。
        public override void Evaluate(NBMessageAssembly inputAssembly)
        {
            NBOutputTerminal outTerminal = OutputTerminal("Out");
            // This code creates an output Assembly based on the input Assembly
            // The Local Environment is copied and editted to provide a dynamic override for the MQOutput node
            NBMessage inputLocalEnvironment = inputAssembly.LocalEnvironment;
            NBMessage outputLocalEnvironment = new NBMessage(inputLocalEnvironment);
            NBElement mqLE = outputLocalEnvironment.RootElement.CreateFirstChild(null, "Destination").CreateFirstChild(null, "MQ");
            mqLE.CreateFirstChild(null, "DestinationData").CreateFirstChild(null, "queueName", "DOTNET.OUT");
            NBMessageAssembly outAssembly = new NBMessageAssembly(inputAssembly, inputAssembly.Message, outputLocalEnvironment, inputAssembly.ExceptionList);                              
            outTerminal.Propagate(outAssembly);
        }
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック

Copyright IBM Corporation 1999, 2013Copyright IBM Corporation 1999, 2013.

        
        最終更新
        
        最終更新 : 2013-02-27 19:22:58


タスク・トピックタスク・トピック | バージョン 8.0.0.2 | bc34217_