| Author | 
		  Message
		 | 
		
		  | nishantmodak | 
		  
		    
			  
				 Posted: Fri Jun 05, 2009 8:39 am    Post subject: Resend Request | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 25 May 2009 Posts: 19
  
  | 
		  
		    
			  
				If I get a Failure on  a HTTP Request node (while invoking a webservice), I need to resend the request to the webservice.
 
 
Is there a way I can configure the retry ?
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | broker_new | 
		  
		    
			  
				 Posted: Fri Jun 05, 2009 9:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 30 Nov 2006 Posts: 614 Location: Washington DC 
  | 
		  
		    
			  
				Whenever a web service call fails, the message will be propagated to the Failure terminal, wire a compute node to it and create an environment variable to maintain the retry count.
 
 
HTTP Failure Terminal>>Compute>>Input Terminal of HTTP Request _________________ IBM ->Let's build a smarter planet | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Fri Jun 05, 2009 10:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| broker_new wrote: | 
   
  
	Whenever a web service call fails, the message will be propagated to the Failure terminal, wire a compute node to it and create an environment variable to maintain the retry count.
 
 
HTTP Failure Terminal>>Compute>>Input Terminal of HTTP Request | 
   
 
 
And then watch your EG fall down because of the infinite loop you just wired up.
 
 
Never use node connections to create a loop.  Always use PROPAGATE, or Try/Catch | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | broker_new | 
		  
		    
			  
				 Posted: Fri Jun 05, 2009 11:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 30 Nov 2006 Posts: 614 Location: Washington DC 
  | 
		  
		    
			  
				correct, forgot to post that i am using the propagate in the compute node..when the retry count >5...... propagate to terminal out1 which will go to an error queue; _________________ IBM ->Let's build a smarter planet | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Fri Jun 05, 2009 12:02 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| broker_new wrote: | 
   
  
	| correct, forgot to post that i am using the propagate in the compute node..when the retry count >5...... propagate to terminal out1 which will go to an error queue; | 
   
 
 
 
The PROPAGATE would need to be *before* the HTTPRequest node, and not connected to from anything *after* it.
 
 
Compute->Try/Catch--Try-->HttpRequest
 
 --Catch-->DifferentComputeThatLogsTheErrorAndExits | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | broker_new | 
		  
		    
			  
				 Posted: Tue Jun 09, 2009 11:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 30 Nov 2006 Posts: 614 Location: Washington DC 
  | 
		  
		    
			  
				What are the things that need to be considered for not wiring the failure terminal to the input terminal, its working good, i haven't found any spikes in CPU nor the memory, working perfectly in production. _________________ IBM ->Let's build a smarter planet | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dmw1986 | 
		  
		    
			  
				 Posted: Wed Jun 10, 2009 7:18 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 24 Sep 2008 Posts: 35
  
  | 
		  
		    
			  
				
   
	| broker_new wrote: | 
   
  
	Whenever a web service call fails, the message will be propagated to the Failure terminal, wire a compute node to it and create an environment variable to maintain the retry count.
 
 
HTTP Failure Terminal>>Compute>>Input Terminal of HTTP Request | 
   
 
 
 
Can you post your ESQL? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | broker_new | 
		  
		    
			  
				 Posted: Wed Jun 10, 2009 7:33 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 30 Nov 2006 Posts: 614 Location: Washington DC 
  | 
		  
		    
			  
				(WMB 6.0.3)
 
 
HTTP Failure Terminal>>Compute (out1)>>Input Terminal of HTTP Request
 
                                    Compute (out2)>>MQOutput (Error Queue)
 
 
 
DECLARE tns 		NAMESPACE 'http://www.staples.com/orderentry';
 
DECLARE soapEnv 	NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
 
		
 
SET Environment.RetryCount = CAST(Environment.RetryCount AS INTEGER) +1;
 
		
 
IF(Environment.RetryCount <= 5) THEN
 
	SET OutputRoot.HTTPRequestHeader= Environment.HTTPHeader;
 
	SET OutputRoot.XMLNS		     = Environment.XMLNS;
 
	PROPAGATE TO TERMINAL 'out1';
 
ELSE
 
	SET OutputRoot.MQMD	 =	Environment.MQMD;
 
	SET OutputRoot.XMLNS =  Environment.XMLNS;	
 
	PROPAGATE TO TERMINAL 'out2';				
 
END IF; _________________ IBM ->Let's build a smarter planet | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dmw1986 | 
		  
		    
			  
				 Posted: Wed Jun 10, 2009 7:45 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 24 Sep 2008 Posts: 35
  
  | 
		  
		    
			  
				Thanks, Is there a way you can do SOAPFailure > Compute > InputSoap
 
 
But in the compute say retry every 5 minutes? Will the TimeoutNotification Node work for this? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | AkankshA | 
		  
		    
			  
				 Posted: Thu Jun 11, 2009 8:07 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 12 Jan 2006 Posts: 1494 Location: Singapore 
  | 
		  
		    
			  
				you can use the same logic of retrying in eSQL itself....
 
 
just that u should always avoid creating loops in message flow.... and have a good mechanism of exception handling.... _________________ Cheers | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |