Author |
Message
|
wmbv7newbie |
Posted: Wed Mar 18, 2015 11:20 pm Post subject: Environment Tree Not Getting Propagated |
|
|
Centurion
Joined: 13 May 2014 Posts: 121
|
Hi,
I am working on WMB V8 and struggling with this issue for a few days now.
My message flow looks like -
Message Flow 1 --
SOAPInput -> SOAPExtract -> FlowOrder ->
1. Compute (Populate headers - Properties, MQMD and XMLNSC). Populate Environment with input data. -> MQOutput Queue 1
2. Compute (Populate headers and create response) -> SOAPReply
Message Flow 2 --
MQInput Queue 1 -> Compute (use Environment data) ->Subflow .....
The problem is the Environment I am populating in flow 1 is not getting propagated to flow 2. I could not find any specific properties to set as Environment gets propagated by default. However, the compute mode is set to LocalEnvironment and Message. Logical Order is also selected.
I could not find anything in the trace as well.
Any leads would help. Thanks! |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Mar 18, 2015 11:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Working as designed.
The two flows run in totally separate threads. Even different processes if they are deployed into different Execution Groups.
If there is something in the documentation that suggests that this is possible then please let IBM know so that it can be corrected. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
wmbv7newbie |
Posted: Thu Mar 19, 2015 12:09 am Post subject: |
|
|
Centurion
Joined: 13 May 2014 Posts: 121
|
So even if I select Transaction Mode Yes, I cannnot use the Environment tree in further message flows?
But we have been using this architecture in several projects where we save details in Environment tree and it has to be used in downstream message flows.
In fact I just checked the Airline Reservation sample flow and it uses the Environment.Variables saved in one message flow in in subsequent flows. |
|
Back to top |
|
 |
wmbv7newbie |
Posted: Thu Mar 19, 2015 1:11 am Post subject: |
|
|
Centurion
Joined: 13 May 2014 Posts: 121
|
Ok so I created a simple test flow with just the MQInput -> Compute -> MQOutput and then another flow to get this message and I see that I cannot pass either the Environment Tree or the LocalEnvironment Tree.
Is this really true? I am surprised I could have missed this. Any workarounds to share data among message flows except external chars? |
|
Back to top |
|
 |
McueMart |
Posted: Thu Mar 19, 2015 1:49 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
This is 100% true!
The Environment / LocalEnvironment tree's scope is the execution of the thread. As soon as the thread finishes processing (In your simple flow, this would be when the message has gone to the MQOutput node) then these trees are lost.
If you need to pass data between flows, there are a number of techniques to consider:
- Store the data as part of the message body
- Store the data as part of the message header (RFH2 header, usr folder)
- Store the data in a DB
- Store the data in a SHARED variable
- Store the data in a java based store (Broker Global Cache)
When you say "But we have been using this architecture in several projects where we save details in Environment tree and it has to be used in downstream message flows." , I am certain that you must be confused as this is not the way that broker works. Please have a good read through the code to understand how it really works. |
|
Back to top |
|
 |
wmbv7newbie |
Posted: Thu Mar 19, 2015 2:28 am Post subject: |
|
|
Centurion
Joined: 13 May 2014 Posts: 121
|
Looks like you are right. I might have misunderstood the code.
Thanks for the suggestions! |
|
Back to top |
|
 |
|