| Author | 
		  Message
		 | 
		
		  | SANTYP | 
		  
		    
			  
				 Posted: Tue Nov 17, 2009 11:52 pm    Post subject: How to handle multilple messages comming to common subflow | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 27 Mar 2007 Posts: 142
  
  | 
		  
		    
			  
				Hi All,
 
 
I created an subflow with 4 input nodes, 
 
which are connected to one compute node..
 
How to handle inputs from these 4 nodes in an unique way.. in the other words..
 
Can I recongnise from which input terminal I am receiving the message..?
 
 
Is there any tree structure that will recognise from which inputnode I am receiving the messages..?
 
 
Please respond to me ASAP thnaks in advance... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | AkankshA | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 12:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 12 Jan 2006 Posts: 1494 Location: Singapore 
  | 
		  
		    
			  
				populate some env variable before sending msg to that subflow for each terminal and check for the value of the same in that compute node
 
 
   _________________ Cheers | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smdavies99 | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 12:37 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land. 
  | 
		  
		    
			  
				What about setting some identifier before you enter the subflow?
 
 
Then you would only need one input terminal...
 
   
	| Code: | 
   
  
	
 
 set Environment.Flow.Identifier = 1 or 2 or 3 or 4
 
 | 
   
 
 
depending upon where it is called from. _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SANTYP | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 1:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 27 Mar 2007 Posts: 142
  
  | 
		  
		    
			  
				
   
	| smdavies99 wrote: | 
   
  
	What about setting some identifier before you enter the subflow?
 
 
Then you would only need one input terminal...
 
   
	| Code: | 
   
  
	
 
 set Environment.Flow.Identifier = 1 or 2 or 3 or 4
 
 | 
   
 
 
depending upon where it is called from. | 
   
 
 
 
Hi thanks for your response.. but is there any other way to handle this..?
 
becasue.. my subflow uses differnt application's message I don't have any control to set environments values for incomming messages... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | AkankshA | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 1:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 12 Jan 2006 Posts: 1494 Location: Singapore 
  | 
		  
		    
			  
				
   
	| SANTYP wrote: | 
   
  
	
 
 
Hi thanks for your response.. but is there any other way to handle this..?
 
becasue.. my subflow uses differnt application's message I don't have any control to set environments values for incomming messages... | 
   
 
 
 
do not change in main flow
 
 
in subflow.. when u receive message from each input node.. add a compute node and populate the node preceding it and then merge all 4 nodes into 1 compute and check for the value... _________________ Cheers | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SANTYP | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 2:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 27 Mar 2007 Posts: 142
  
  | 
		  
		    
			  
				
   
	| AkankshA wrote: | 
   
  
	
   
	| SANTYP wrote: | 
   
  
	
 
 
Hi thanks for your response.. but is there any other way to handle this..?
 
becasue.. my subflow uses differnt application's message I don't have any control to set environments values for incomming messages... | 
   
 
 
 
do not change in main flow
 
 
in subflow.. when u receive message from each input node.. add a compute node and populate the node preceding it and then merge all 4 nodes into 1 compute and check for the value... | 
   
 
 
 
Its again using 5 computenodes in the subflow right..
 
Is there any other solution in which I can handle in single compute node | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SANTYP | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 2:10 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 27 Mar 2007 Posts: 142
  
  | 
		  
		    
			  
				
   
	| AkankshA wrote: | 
   
  
	
   
	| SANTYP wrote: | 
   
  
	
 
 
Hi thanks for your response.. but is there any other way to handle this..?
 
becasue.. my subflow uses differnt application's message I don't have any control to set environments values for incomming messages... | 
   
 
 
 
do not change in main flow
 
 
in subflow.. when u receive message from each input node.. add a compute node and populate the node preceding it and then merge all 4 nodes into 1 compute and check for the value... | 
   
 
 
 
Its again using 5 computenodes in the subflow right..
 
Is there any other solution in which I can handle in single compute node | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | AkankshA | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 2:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 12 Jan 2006 Posts: 1494 Location: Singapore 
  | 
		  
		    
			  
				
   
	| SANTYP wrote: | 
   
  
	
 
 
Its again using 5 computenodes in the subflow right..
 
Is there any other solution in which I can handle in single compute node | 
   
 
 
 
No broker property can give you the name of the previous node.... which the message followed _________________ Cheers | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 3:06 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				| Why is it important to use a single Compute node? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smdavies99 | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 4:25 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land. 
  | 
		  
		    
			  
				
   
	| kimbert wrote: | 
   
  
	| Why is it important to use a single Compute node? | 
   
 
 
 
Perhaps some people have an aversion to them? 
 
There have been a few posts here in the recent months where the OP was very reluctant to use one when it makes sense to do so. Is there a school of 'Minimalist Flow Design' that exists somewhere?
 
   _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sirsi | 
		  
		    
			  
				 Posted: Wed Nov 18, 2009 5:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 11 Mar 2005 Posts: 177
  
  | 
		  
		    
			  
				| usuage of nodes depends on ur business logic... in your case you have to use few compute nodes to fit into ur requirement | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mercator | 
		  
		    
			  
				 Posted: Thu Nov 19, 2009 9:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 21 Jul 2009 Posts: 34
  
  | 
		  
		    
			  
				
   
	| smdavies99 wrote: | 
   
  
	| Is there a school of 'Minimalist Flow Design' that exists somewhere? | 
   
 
 
 
Yes there is.  I stumbled across a document at my current client.  It was a recent recommended practices document given to them by a consultant.  This consultant came from a very large company.  In his recommendations he states the following:
 
 
- No more than 10 nodes per flow
 
- No more than 5 nodes per sub flow
 
- Avoid using Compute and Java nodes
 
 
I'm still baffled by this document.  I'm also a bit frightened by it. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | agrawalamit166 | 
		  
		    
			  
				 Posted: Thu Nov 19, 2009 10:54 am    Post subject: I created an subflow with 4 input nodes, | 
				     | 
			   
			 
		   | 
		
		
		    Voyager
 
 Joined: 17 Aug 2009 Posts: 78 Location: NY, US 
  | 
		  
		    
			  
				| If it is MQInput, I think, we can find the source name through InputRoot.MQMD.SourceQueue... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smdavies99 | 
		  
		    
			  
				 Posted: Thu Nov 19, 2009 11:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land. 
  | 
		  
		    
			  
				
   
	| Mercator wrote: | 
   
  
	
   
	| smdavies99 wrote: | 
   
  
	| Is there a school of 'Minimalist Flow Design' that exists somewhere? | 
   
 
 
 
- No more than 10 nodes per flow
 
- No more than 5 nodes per sub flow
 
- Avoid using Compute and Java nodes
 
 
I'm still baffled by this document.  I'm also a bit frightened by it. | 
   
 
 
 
Ouch
 
 
Many of the projects I have worked on over the years would most certainly fall foul of those 'rules'. 
 
There are far to many reasons to state here why I find them impossible to agree with especially avoiding ESQL & Java compute nodes but here are a few.
 
- Compute Nodes: These are (IMHO) the most flexible nodes in the toolkit. 
 
- My standard error handler sub-flow has 9 nodes including Zip, Email & FileOutput nodes.
 
- If you are using multiple databases if different types (eg DB2 & ORacle) that is TWO nodes. You will soon use up the quota of 10.
 
- These rules/guidelines might have been relevant in V2.x days but now? 
 
I certainly would not be happy developing flows using these rules.
 
 
Just my 0.02p worth. _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mercator | 
		  
		    
			  
				 Posted: Thu Nov 19, 2009 11:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 21 Jul 2009 Posts: 34
  
  | 
		  
		    
			  
				
   
	| smdavies99 wrote: | 
   
  
	
 
 
Ouch
 
 
Many of the projects I have worked on over the years would most certainly fall foul of those 'rules'. 
 
There are far to many reasons to state here why I find them impossible to agree with especially avoiding ESQL & Java compute nodes but here are a few.
 
- Compute Nodes: These are (IMHO) the most flexible nodes in the toolkit. 
 
- My standard error handler sub-flow has 9 nodes including Zip, Email & FileOutput nodes.
 
- If you are using multiple databases if different types (eg DB2 & ORacle) that is TWO nodes. You will soon use up the quota of 10.
 
- These rules/guidelines might have been relevant in V2.x days but now? 
 
I certainly would not be happy developing flows using these rules.
 
 
Just my 0.02p worth. | 
   
 
 
 
Agreed.  Thats why I told my client to throw the doc in the trash if they want to be succesful. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |