Author |
Message
|
ferloz |
Posted: Thu Jun 23, 2005 8:41 am Post subject: where i am |
|
|
 Novice
Joined: 26 May 2005 Posts: 23
|
I've one msg flow ( written by me ) that runs in two different WBIMB.
The optimum will be , for me , to have a "custom node" able to set an environment variable with the contents of a property.
Someone know if there is an support pack or similar available free on the net ?
Thanks in advance .
 _________________ fkid |
|
Back to top |
|
 |
wschutz |
Posted: Thu Jun 23, 2005 10:07 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Do you actually want to set an OS environment variable from a node property (or do you mean a value in the message tree)? What would you do with that since that setting would only be effective in the process running the DataFlowEngine?
If you want to set the tree FROM environment variables, see supportpac IA06
(http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24000599&loc=en_US&cs=utf-8&lang=en)
Source code is included, so I guess you could make it work "backwards". _________________ -wayne |
|
Back to top |
|
 |
ferloz |
Posted: Mon Jun 27, 2005 4:37 am Post subject: |
|
|
 Novice
Joined: 26 May 2005 Posts: 23
|
Due to a my terrible english i was'nt very clear.
I'll try to explain better :
the input is a "shared queue" opened in input by two dinstances of the same MsgFlow, that are running on differents machines but both machines have access to the same db2 table .
Imagine that the configuration data present on the table have to be different if you are running on machine "a" or on machine "b" .
My opinion is to use the promoted property in the message flow as a customization point and to have two different bar files, one for the machine "a" and one for the "b".
In this case is very simple to make the two path operational with a single change.
Thanks
Paolo _________________ fkid |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jun 27, 2005 4:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The IA06 support pack that wschutz mentioned will work for this.
It is a little more powerful than you need - you really only need a node that copies properties into Environment. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ferloz |
Posted: Mon Jun 27, 2005 4:55 am Post subject: |
|
|
 Novice
Joined: 26 May 2005 Posts: 23
|
Sorry to all,
i've read the pdf of IA06, but is the opposite i need ( ... my english ...! )
My problem i to identify a msgflow, with "customization data" inside the flow not really via a variable in the environment ( the environment in this case is a z/Os Unix Machine ).
 _________________ fkid |
|
Back to top |
|
 |
recallsunny |
Posted: Wed Jun 29, 2005 10:20 am Post subject: Try Java based solution |
|
|
 Disciple
Joined: 15 Jun 2005 Posts: 163 Location: Massachusetts
|
If you are working with MB v5, FP4 then you can create a Static Java Method which will return the BrokerName of the Instance on which the message flow is running.
Code: |
public static String getMsgBrokerName()
{
String brkname = "null";
try
{
MbNode mbnode = new MbNode();
brkname = mbnode.getBroker().getName();
}
catch(MbException e)
{
return brkname ;
}
return brkname;
} |
Call this method from your ESQL
Code: |
CREATE PROCEDURE getMsgBroker ()
RETURNS CHAR
LANGUAGE JAVA
EXTERNAL NAME
"com.util.getMsgBrokerName";
|
Once you have the broker name accesible, you can code your logic based on which instance of the flow is running this code.
Hope this helps!!
 |
|
Back to top |
|
 |
mverh |
Posted: Thu Jun 30, 2005 9:03 am Post subject: |
|
|
Voyager
Joined: 06 Mar 2002 Posts: 97
|
|
Back to top |
|
 |
|