WebSphere Message Broker バージョン 8.0.0.5 オペレーティング・システム: AIX、HP-Itanium、Linux、Solaris、Windows、z/OS

製品の最新バージョンについては、IBM Integration Bus バージョン 9.0 をご覧ください。

.NETCompute ノードを使用したグローバル環境の更新

.NETCompute ノードでコードを使用して、グローバル環境を変更します。

論理ツリーが入力メッセージ用に作成される際に、Global Environment ツリーが必ず作成されます。 ただし、メッセージ・フローはデータを取り込まず、その内容を使用しません。このツリーは、あるノードから別のノードへと情報を受け渡すなどの、独自の目的に使用できます。 このツリー全体をスクラッチパッドまたは作業域として使用できます。
グローバル環境は、メッセージ・フローのどの時点でも変更できます。したがって、変更する際にグローバル環境のコピーを作成しないでください。以下の C# コードは、.NETCompute ノードでグローバル環境を変更する方法を示しています。
        public override void Evaluate(NBMessageAssembly inputAssembly)
        {
            NBOutputTerminal outTerminal = OutputTerminal("Out");
            NBMessage inputMessage = inputAssembly.Message;
            // Create a new empty message, ensuring it is disposed after use
            using (NBMessage outputMessage = new NBMessage())
            {
                NBMessageAssembly outAssembly = new NBMessageAssembly(inputAssembly, outputMessage);
                NBElement inputRoot = inputMessage.RootElement;
                NBElement outputRoot = outputMessage.RootElement;

                // Optionally copy message headers, remove if not needed
                CopyMessageHeaders(inputRoot, outputRoot);

                #region UserCode
                // Add user code in this region to create a new output message
                NBMessage env = outAssembly.Environment;
                env.RootElement.CreateFirstChild(null, "Status", "Success");                               
                #endregion UserCode

                // Change the following if not propagating message to the 'Out' terminal
                outTerminal.Propagate(outAssembly);
            }
        }
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック

Copyright IBM Corporation 1999, 2014Copyright IBM Corporation 1999, 2014.

        
        最終更新:
        
        最終更新: 2015-02-28 17:48:48


タスク・トピックタスク・トピック | バージョン 8.0.0.5 | bc34218_