Author |
Message
|
kash3338 |
Posted: Mon Jan 21, 2013 10:12 pm Post subject: HTTPReplyStatusCode |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
In my flow I need to capture the HTTP ReplystatusCode in the Monitoring event in my HTTReply node.
In case of error response, I override the ReplystatusCode to '400' in my compute node by using the LocalEnvironment variable,
Code: |
SET OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode = '400';
|
With this case, I am able to use the same path for capturing the failure status code in monitoring event.
But in case of success, I will have to manually set the status code to '200' in my compute in a LocalEnvironment/Environment and use the path in the HTTPReply node. Is there no other way than to set the status code manually in success scenario? Is this the way it has to be done? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 22, 2013 5:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I think the more pertinent question is why are you getting an error in the monitoring event? Can you describe it?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 22, 2013 6:55 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
fjb_saper wrote: |
I think the more pertinent question is why are you getting an error in the monitoring event? Can you describe it?  |
Actually I never got an error in the monitoring event. Sorry if I was not clear.
When I send the error response for the incoming request, I set the ReplyStatusCode to '400' (since the response code has to be overridden) in LocalEnvironment variable and I use the same LocalEnvironment to specify in the path for monitoring event.
But when I have a success scenario, by default the ReplyStatusCode is '200' and I do not set them anywhere in the LocalEnvironment (since that is the default value in response). Now if I have to capture this code in my monitoring, I have to manually set it in the same path as above (in LocalEnvironment), to capture in monitoring event.
Is this the way to capture the ReplyStatusCode in case of success scenario or is there any other way? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 22, 2013 8:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Once resequenced, the sequence of events can give you a hint as well.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 22, 2013 9:06 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
fjb_saper wrote: |
Once resequenced, the sequence of events can give you a hint as well.  |
Sorry dint get you. You mean resequencing the events? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 22, 2013 9:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kash3338 wrote: |
fjb_saper wrote: |
Once resequenced, the sequence of events can give you a hint as well.  |
Sorry dint get you. You mean resequencing the events? |
Yes...
In my experience with events 1 and 4 sent from the input node (start /end of transaction) you get your events in order 1,4,2,3 hence the need to resequence them... or not...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 22, 2013 9:25 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
fjb_saper wrote: |
Yes...
In my experience with events 1 and 4 sent from the input node (start /end of transaction) you get your events in order 1,4,2,3 hence the need to resequence them... or not...  |
Actually my problem is not with the sequence of events. My doubt is to know if the only option to get the HTTP ReplyStatusCode (200) when the transaction is successfull, is to set the status manually to '200' in the compute node prior to the HTTP Reply node? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 22, 2013 9:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried enquiring for the status at the httpReplyNode.output event? _________________ MQ & Broker admin |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 22, 2013 9:29 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
fjb_saper wrote: |
Have you tried enquiring for the status at the httpReplyNode.output event? |
Yes but from which location in the LocalEnvironment tree do I get that? |
|
Back to top |
|
 |
Senthamizh |
Posted: Wed Jan 23, 2013 2:48 am Post subject: |
|
|
Apprentice
Joined: 21 Dec 2009 Posts: 47
|
kash3338 wrote: |
fjb_saper wrote:
Have you tried enquiring for the status at the httpReplyNode.output event?
Yes but from which location in the LocalEnvironment tree do I get that? |
Did you try the WrittenDestination tree of the LocalEnvironment which would be populated when you connect the out terminal of the HttpReply node..
May be there, may be not, Give a try. Good luck |
|
Back to top |
|
 |
kash3338 |
Posted: Wed Jan 23, 2013 9:35 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Senthamizh wrote: |
Did you try the WrittenDestination tree of the LocalEnvironment which would be populated when you connect the out terminal of the HttpReply node..
May be there, may be not, Give a try. Good luck |
The point is the monitoring event should be captured at the HTTReply node level. I do not have any node down the line after the HTTPReply node. I do not see any values in the LocalEnvironment when it reaches the HTTPReply node in success scenario. |
|
Back to top |
|
 |
|