Author |
Message
|
bprasana |
Posted: Mon Apr 23, 2012 3:22 pm Post subject: UDPs from 2 different instances of same subflow |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
I have used 2 instances of the same subflow(call it A) inside another subflow (call it B)and I promoted the relevant properties and UDPs of A to B.
Now I want the UDPs to be populated differently based on different instance of the subflow. This is not happening. I still get same UDP values I set in first instance of subflow A when the second instance of subflow A is also encountered.
the subflow B looks like this
inputnode---->flow order ----->subflow A(UDP1= 'dummy')
------>subflow A(UDP1 ='dummy1')
I am using WMB 7.0.0.3. Has anybody encountered this issue before?
is it working as designed? or am i missing something? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 23, 2012 4:50 pm Post subject: Re: UDPs from 2 different instances of same subflow |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bprasana wrote: |
I have used 2 instances of the same subflow(call it A) inside another subflow (call it B)and I promoted the relevant properties and UDPs of A to B.
Now I want the UDPs to be populated differently based on different instance of the subflow. This is not happening. I still get same UDP values I set in first instance of subflow A when the second instance of subflow A is also encountered.
the subflow B looks like this
inputnode---->flow order ----->subflow A(UDP1= 'dummy')
------>subflow A(UDP1 ='dummy1')
I am using WMB 7.0.0.3. Has anybody encountered this issue before?
is it working as designed? or am i missing something? |
If you want separation within the same eg, you either need to go to the application level isolation (broker 8 ) or use broker schema as separation...
Have fun  _________________ MQ & Broker admin
Last edited by fjb_saper on Mon Apr 23, 2012 4:56 pm; edited 1 time in total |
|
Back to top |
|
 |
bprasana |
Posted: Mon Apr 23, 2012 4:55 pm Post subject: Broker schema? |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
How can I use different broker schema when it's the same subflow? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 23, 2012 4:58 pm Post subject: Re: Broker schema? |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bprasana wrote: |
How can I use different broker schema when it's the same subflow? |
bar file manipulation? same schema but different name? try out, and keep with what works... Have you tried promoting the properties to the main flow?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Esa |
Posted: Mon Apr 23, 2012 11:34 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
This seems to happen when you have promoted the embedded subflow properties to the main subflow. The properties go automatically to different groups. But that is not enough. You will have to rename the properties, too, so that they do not have the same name. Even if they are in different groups. I think groups are here just for easier administration and the group name is not part of the qualified name of the property in runtime. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 24, 2012 7:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Yeah, you should be able to promote the properties of the subflow node itself in the main flow to different names at the message flow level.
i.e. promote the properties in the subflow so they show up on the main flow as properties of the node, and then promote those properties to the main flow with different names. |
|
Back to top |
|
 |
bprasana |
Posted: Tue Apr 24, 2012 8:48 am Post subject: works without promoting the property |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
@Esa and mqjeff
Yes, by default the toolkit gives a different name.(it appends numeric 1 to the name of the property) if there is a conflict.
When I dont promote this UDP and hard code it in one of the subflow A instances, then it takes a correct value.
I even tried declaring the UDP(the one with 1 appended after promotion) in ESQL associated with subflow A. that did not help either.
The ESQL looked like this.
declare UDP as external char 'dummy';
declare UDP1 as external char 'dummy1';
If SFA_instance=1 then set x = UDP
else if SFA_instance=2 then set x=UDP1;
even if the message flows through SFA_instance=2 it picks up the value 'dummy1' and not the promoted value.
but for instance=1 its able to override the 'dummy' to promoted value.
I am trying to promote both these properties to the mainflow to check if that works. |
|
Back to top |
|
 |
Esa |
Posted: Wed Apr 25, 2012 5:56 am Post subject: Re: works without promoting the property |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
bprasana wrote: |
The ESQL looked like this.
declare UDP as external char 'dummy';
declare UDP1 as external char 'dummy1';
If SFA_instance=1 then set x = UDP
else if SFA_instance=2 then set x=UDP1;
|
Well, if this is ESQL from a compute node within the subflow that is embedded twice in another subflow, you are trying to be too clever...
The subflow does not have to be aware of that it has two instances.
So if the sublow has an UDP named 'UDP', your ESQL should be:
When you promote the sublow properties, you rename the properties to UDP1 and UDP2. In runtime these are mapped to subflow1.UDP and subflow2.UDP. |
|
Back to top |
|
 |
bprasana |
Posted: Wed Apr 25, 2012 7:36 am Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Quote: |
When you promote the sublow properties, you rename the properties to UDP1 and UDP2. In runtime these are mapped to subflow1.UDP and subflow2.UDP. |
This is what is not happening. Both subflow1.UDP and subflow2.UDP are getting mapped to UDP1.
Did you get a chance to try it out?
I wonder if its just me or someone else encountered this problem when using the same subflow twice inside a subflow. |
|
Back to top |
|
 |
Esa |
Posted: Wed Apr 25, 2012 11:49 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
bprasana wrote: |
Did you get a chance to try it out?
|
Did you?
Read again. |
|
Back to top |
|
 |
bprasana |
Posted: Thu Apr 26, 2012 10:13 am Post subject: I did |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Yes I did, But did not work for me |
|
Back to top |
|
 |
Esa |
Posted: Fri Apr 27, 2012 12:19 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Did you try it like this:
Code: |
declare UDP as external char 'dummy';
...
SET x = UDP; |
and
inputnode---->flow order ----->subflow A(UDP1= 'dummy1')
------>subflow A(UDP1 ='dummy2')
Which value do you get in subflow 2? |
|
Back to top |
|
 |
bprasana |
Posted: Fri Apr 27, 2012 4:34 am Post subject: SOLVED |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
I tried promoting both the properties from main subflow to the main flow. That solved the problem.
My mistake sorry! |
|
Back to top |
|
 |
|