Author |
Message
|
harelmoshe1 |
Posted: Wed Mar 22, 2006 5:58 am Post subject: Design problem |
|
|
Apprentice
Joined: 29 Dec 2005 Posts: 41
|
Hey, i have to write a a bunch of flows, all of the form:
HTTPInput -> Compute -> HTTPRequest -> Compute
I want to handle HTTP errors in a generic way - an error-handling subflow that will save the XML which failed to be sent in the HTTPRequest to an MQ queue, and later will try to resend it again, something like:
MQInput -> HTTPRequest
the problem is that i can't hard-code the URL to which the request failed and store it in the error-handling subflow somewhere, since it changes from flow to flow - so i lose the generic handling by having to specifically write an error-handling flow to each of the original flows i described in the beginning. Does anyone have an idea how to generically handle this scenarion ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 22, 2006 8:07 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I'm not sure this can be handled in an automated way as the automated request did FAIL?
Anyway have you tried adding the Exception List to the MF and when saving/picking up routing according to the exceptions thrown ?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
harelmoshe1 |
Posted: Thu Mar 23, 2006 4:25 am Post subject: |
|
|
Apprentice
Joined: 29 Dec 2005 Posts: 41
|
That's one thing i had in mind, but it still can't help me - if i'll route the exception-tree to the generic flow i want to use, it would still be unable to extract the URL to which the sending failed and attempt to resend it since it doesn't appear anywhere after the error occured... |
|
Back to top |
|
 |
mgk |
Posted: Thu Mar 23, 2006 4:55 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
The HTTP Request node allows the destination URL on the node to be overridden with a setting in the LocalEnvironemnt such as:
Code: |
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://127.0.0.1:80/'; |
Therefore, you could design a single flow that implemented this in the first compute node dynamically. Then, in the subflow you could use this information and store it with the input message (maybe in a RFH2 header) and use in in the error handling flow.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
harelmoshe1 |
Posted: Thu Mar 23, 2006 5:21 am Post subject: |
|
|
Apprentice
Joined: 29 Dec 2005 Posts: 41
|
Thanks !
That's exactly what iv'e been looking for.
Is there any place where i can find all the settings which can be overridden for various nodes ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 23, 2006 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
harelmoshe1 wrote: |
Is there any place where i can find all the settings which can be overridden for various nodes ? |
You mean, aside from the documentation for each individual node?
No, I don't believe there is a master list of node properties that can be replaced with code settings. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
harelmoshe1 |
Posted: Mon Mar 27, 2006 3:56 am Post subject: |
|
|
Apprentice
Joined: 29 Dec 2005 Posts: 41
|
Should i uncheck 'Generate HTTP header from input' ? seems the address in not taken well from OutputLocalEnvironment.Destination.HTTP.RequestURL or there's something else i have to check/uncheck in the node...
It works only when i set the address in the node's properties... any idea ? |
|
Back to top |
|
 |
mgk |
Posted: Mon Mar 27, 2006 6:29 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
The Local Environment setting is independent of the GenerateDefaultHeaders property. At a guess you have not changed the ComputeMode property of the preceding compute node to inlcude the LocalEnvironment, so the node is using the default (which is the node's setting).
To make sure, place a Trace Node immediately before the Request Node that traces the LocalEnvrionment and make sure your setting is there in the trace output. If it is, and this is still not working for you for some other reason, then post the trace output here.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
harelmoshe1 |
Posted: Mon Mar 27, 2006 8:26 am Post subject: |
|
|
Apprentice
Joined: 29 Dec 2005 Posts: 41
|
Thanks, right guess !
I never had in that in mind...
Now it works perfect. |
|
Back to top |
|
 |
|