Author |
Message
|
lucas |
Posted: Fri Jun 14, 2013 1:33 am Post subject: Create a sync Message Flow |
|
|
Novice
Joined: 14 Jun 2013 Posts: 17
|
There is a requirement.
The message get from the MQ input and send to the HTTPRequest and then return to compute node.But I also need the message from MQInput to the compute node.
Question is how to design this flow? |
|
Back to top |
|
 |
stevarg |
Posted: Fri Jun 14, 2013 1:42 am Post subject: |
|
|
Novice
Joined: 20 Nov 2012 Posts: 24
|
Why not keep the message in the Environment. |
|
Back to top |
|
 |
kash3338 |
Posted: Fri Jun 14, 2013 2:29 am Post subject: Re: Create a sync Message Flow |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lucas wrote: |
But I also need the message from MQInput to the compute node. |
stevarg wrote: |
Why not keep the message in the Environment. |
Actually it depends. Consider its a huge payload but we only need 5 to 10 fields of the Input message at a later point in the flow, there is no use of storing the entire payload in Environment.
So how many fields do you actually require and what's the size of your input payload?
lucas wrote: |
Question is how to design this flow? |
It would have been better if you had tried few options and asked for suggestions here on the best approach, than to ask for the complete design here. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Jun 14, 2013 3:12 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
kash3338 |
Posted: Fri Jun 14, 2013 3:24 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
FlowOrder node was designed for such purpose |
Even in that case, the use of Environment is required based on the requirement. If the requirement is to construct your Output tree with values both from MQInput and a HTTPRequest call, then Environment comes into picture. |
|
Back to top |
|
 |
Esa |
Posted: Fri Jun 14, 2013 3:30 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
If may be better to put the http response in Environment (or LocalEnvironment). If you are not looping extensively with tens or hundreds of http requests, you could test if you can make the HttpRequest put the Response message directly to Environment or InputLocalEnvironment. It works with MQGet, why not with HttpRequest.
Set HttpResponse.Advanced."Response message location in tree*" to InputLocalEnvironment.HttpResponse, for example, and you don't need to copy it programmatically in a downstream compute node.
lancelotlinc wrote: |
FlowOrder node was designed for such purpose. Use subflows. |
Yes (and ??? for the out-of context comment 'Use subflows'). Or you can use PROPAGATE statement for implementing Flow Order -like functionality directly in your compute node. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Jun 14, 2013 3:38 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Esa wrote: |
Yes (and ??? for the out-of context comment 'Use subflows'). Or you can use PROPAGATE statement for implementing Flow Order -like functionality directly in your compute node. |
Why is it you consider subflows to be out of context?
Up-stream-related functions can be grouped together and down-stream functions can be grouped together. Generally subflows provide the grouping mechanism. Why do you consider this comment not within the context of this discussion? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jun 14, 2013 4:45 am Post subject: Re: Create a sync Message Flow |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
kash3338 wrote: |
It would have been better if you had tried few options and asked for suggestions here on the best approach, than to ask for the complete design here. |
In fact, this is best practice. |
|
Back to top |
|
 |
Esa |
Posted: Fri Jun 14, 2013 4:57 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
lancelotlinc wrote: |
Why is it you consider subflows to be out of context?
|
If the question is "how can I combine two messages from different sources" then I consider subflows to be out of context. Of course you can use them in the implementation, but the answer to the question is not "use subflows".
I guess the OP has got more than enough answers now. It's up to him to make a decision and start testing. |
|
Back to top |
|
 |
lucas |
Posted: Sun Jun 16, 2013 8:07 pm Post subject: |
|
|
Novice
Joined: 14 Jun 2013 Posts: 17
|
Thanks guys
I have already completed this requirement.
Just use Environment to save the message.But I think there may be better way to solve it. |
|
Back to top |
|
 |
kash3338 |
Posted: Sun Jun 16, 2013 11:46 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lucas wrote: |
Just use Environment to save the message.But I think there may be better way to solve it. |
Do you actually require the complete input message?
What all values did you store in Environment tree? |
|
Back to top |
|
 |
lucas |
Posted: Mon Jun 17, 2013 7:09 am Post subject: |
|
|
Novice
Joined: 14 Jun 2013 Posts: 17
|
kash3338 wrote: |
lucas wrote: |
Just use Environment to save the message.But I think there may be better way to solve it. |
Do you actually require the complete input message?
What all values did you store in Environment tree? |
Yeah
There are many different HTTP Requests in the flow, but the param of these request only need the part of message.The message is single and it need to update if the httprequest has response.After all of these request complete, I need the message return.
BTW, I till think this requirement is so werid. |
|
Back to top |
|
 |
|