Author |
Message
|
svager |
Posted: Tue Feb 24, 2015 10:14 am Post subject: Get input terminal in the Compute node |
|
|
Newbie
Joined: 27 Jan 2015 Posts: 2
|
Hello,
In my flow I have a Publication node. It has two out terminals OUT and NoMatch. I want to process results of the publication in the Compute Node. It doesn't matter what the result was.
In order for me to do that I need to figure out which terminal Publication node used to send a message to the Compute node.
Is this possible at all? How would I accomplish this without using two different Compute nodes?
Thank you |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Feb 24, 2015 10:51 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you want to use a single Compute Node then you will have to do a bit of investigation yourself. (IMHO)
Wire in a Trace Node on each Terminal and set it to display ${Root} plus some text to uniquely idenfify the output.
Then send two different data into the publication node that will satisfy both conditions. Then you will be able to see what the output are and how they differ. You can program the Comput node to handle both conditions.
That's how I'd probably do it but there may be other ways. If there are easier ways then I'm sire that someone will be along soon to tell us. _________________ 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 |
|
 |
Vitor |
Posted: Tue Feb 24, 2015 11:15 am Post subject: Re: Get input terminal in the Compute node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
svager wrote: |
In order for me to do that I need to figure out which terminal Publication node used to send a message to the Compute node. |
Why? If you don't care about the outcome in that it doesn't affect the downstream processing, why not simply wire both terminals to the same downstream Compute node? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
svager |
Posted: Tue Feb 24, 2015 11:46 am Post subject: Re: Get input terminal in the Compute node |
|
|
Newbie
Joined: 27 Jan 2015 Posts: 2
|
Vitor wrote: |
svager wrote: |
In order for me to do that I need to figure out which terminal Publication node used to send a message to the Compute node. |
Why? If you don't care about the outcome in that it doesn't affect the downstream processing, why not simply wire both terminals to the same downstream Compute node? |
May be I wasn't clear but I didn't say that I don't care for the outcome. I definetly do care. What I am trying to do is to process either outcome in the same compute node. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 24, 2015 1:08 pm Post subject: Re: Get input terminal in the Compute node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
svager wrote: |
May be I wasn't clear but I didn't say that I don't care for the outcome. I definetly do care. What I am trying to do is to process either outcome in the same compute node. |
Ah.
There's no way to determine from ESQL which terminal on the upstream node a message came from. You could reduce the duplication of code by having the processing in a single Compute node, and have 2 Compute nodes (one connected to Out, one connected to NoMatch) that set a LocalEnvironment variable / usr property in an RFH2 / other flag of your choice to indicate which route the message has taken. Both will have their Out terminals connected to the "processing" Compute node, which can use the same code for both outcomes, and interogate the flag when the process flow differs between Out & NoMatch.
That's the best I can think of; someone else might well have a better idea. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 24, 2015 1:12 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The message that's propagated from the out terminal should be noticeably different from the message that's propagated from the no match terminal. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 24, 2015 1:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
The message that's propagated from the out terminal should be noticeably different from the message that's propagated from the no match terminal. |
Really?
I feel some experimentation coming on......  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Feb 25, 2015 1:12 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
and see my post earlier in the thread  _________________ 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 |
|
 |
|