ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error handling in case of TryCatch node

Post new topic  Reply to topic
 Error handling in case of TryCatch node « View previous topic :: View next topic » 
Author Message
nk
PostPosted: Thu Oct 11, 2012 12:11 am    Post subject: Error handling in case of TryCatch node Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 19

I'm processing CSV file. For doing so, i've storing all the records in the database and processing one by one. My requirement is that if processing of certain record get failed based on certain condition then we should throw exception to get email alert and all the remaining record should be processed.

For doing this i'm following pattern

FileInput -> compute(setting environment variables n for storing in the database) -> TryCatch -> Compute(for processing records) ->MqOutput

I'm able to processing all the records based on the conditions but whenever exception is generated at the catch part of TryCatch node, Root is coming as null and this is the reason why my ErrorHandler subflow(connected to catch terminal) is not generating email alert.

the Root what i'm getting from the Trace node connected to Catch terminal
Code:

( ['GENERICROOT' : 0x122d14030]
  (0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0x1208cdef0]
    (0x03000000:NameValue):MessageSet             = NULL
    (0x03000000:NameValue):MessageType            = NULL
    (0x03000000:NameValue):MessageFormat          = NULL
    (0x03000000:NameValue):Encoding               = NULL
    (0x03000000:NameValue):CodedCharSetId         = NULL
    (0x03000000:NameValue):Transactional          = NULL
    (0x03000000:NameValue):Persistence            = NULL
    (0x03000000:NameValue):CreationTime           = NULL
    (0x03000000:NameValue):ExpirationTime         = NULL
    (0x03000000:NameValue):Priority               = NULL
    (0x03000000:NameValue):ReplyIdentifier        = NULL
    (0x03000000:NameValue):ReplyProtocol          = 'UNKNOWN' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = NULL
    (0x03000000:NameValue):IdentitySourceType     = NULL
    (0x03000000:NameValue):IdentitySourceToken    = NULL
    (0x03000000:NameValue):IdentitySourcePassword = NULL
    (0x03000000:NameValue):IdentitySourceIssuedBy = NULL
    (0x03000000:NameValue):IdentityMappedType     = NULL
    (0x03000000:NameValue):IdentityMappedToken    = NULL
    (0x03000000:NameValue):IdentityMappedPassword = NULL
    (0x03000000:NameValue):IdentityMappedIssuedBy = NULL
  )
 
    (0x01000000:Name     ):mcd     = (
      (0x01000000:Name):Msd = (
        (0x02000000:Value): = 'none' (CHARACTER)
      )
    )
  )
  (0x01000000:Name):BLOB       = ( ['none' : 0x1187a0690]
    (0x03000000:NameValue):BLOB = X'' (BLOB)
  )
)


Last edited by nk on Fri Oct 12, 2012 3:57 am; edited 1 time in total
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Oct 11, 2012 1:11 am    Post subject: Re: Error handling in case of TryCatch node Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

nk wrote:
FileInput -> compute(setting environment variables n for storing in the database) -> TryCatch


How did you process / propagate message in first compute node?

--
marko
Back to top
View user's profile Send private message Visit poster's website
rekarm01
PostPosted: Thu Oct 11, 2012 1:15 am    Post subject: Re: Error handling in case of TryCatch node Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

nk wrote:
FileInput -> compute(setting environment variables n for storing in the database) -> TryCatch -> Compute(for processing records) ->MqOutput

I'm able to processing all the records based on the conditions but whenever exception is generated at the catch part of TryCatch node, Root is coming as null and this is the reason why my ErrorHandler subflow(connected to catch terminal) is not generating email alert.

When the message flow throws an exception, Root reverts to an earlier state; any changes between the point where the exception is thrown and where it's caught are undone.

It's not always necessary to throw an exception for every error condition. Why not use a Filter node or some form of PROPAGATE instead to test for the error condition, to route errors to an alternate path for email alerts?
Back to top
View user's profile Send private message
nk
PostPosted: Thu Oct 11, 2012 11:44 pm    Post subject: Re: Error handling in case of TryCatch node Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 19

marko.pitkanen wrote:
nk wrote:
FileInput -> compute(setting environment variables n for storing in the database) -> TryCatch


How did you process / propagate message in first compute node?

--
marko

In the 1st compute node i'm just storing records into the databse and in the 2nd processing the records by storing into the Environment list and in the 2nd compute node itself propagating records(one by one) after processing.
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Oct 11, 2012 11:50 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

I tried to ask do you propagate OutputRoot.BLOB.BLOB from the first compute -node to TryCatch node?

--
marko
Back to top
View user's profile Send private message Visit poster's website
nk
PostPosted: Fri Oct 12, 2012 12:06 am    Post subject: Re: Error handling in case of TryCatch node Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 19

[quote="rekarm01"]
nk wrote:
FileInput -> compute(setting environment variables n for storing in the database) -> TryCatch -> Compute(for processing records) ->MqOutput

It's not always necessary to throw an exception for every error condition. Why not use a Filter node or some form of PROPAGATE instead to test for the error condition, to route errors to an alternate path for email alerts?


I was talking abt the condition when exception occurs. Here we cant use PROPAGATE for the exception part because once i'll use, further record wont get processed albeit i'm using PROPAGATE for the correct output msgs.

@Marko: i'm not doing that in the 1st compute node. Instead doing it in the ErrorHandler subflow but it's null. Infact in the ErrorHandler subflow InputBody is null, when I've connected with the Catch terminal.
Back to top
View user's profile Send private message
nk
PostPosted: Fri Oct 12, 2012 3:55 am    Post subject: Re: Error handling in case of TryCatch node Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 19

i found solution. thank you Guys for your support
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Fri Oct 12, 2012 8:23 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

And for the further readers what was your solution?

--
Marko
Back to top
View user's profile Send private message Visit poster's website
harry123
PostPosted: Tue Mar 26, 2013 12:03 pm    Post subject: Re: Error handling in case of TryCatch node Reply with quote

Newbie

Joined: 30 Oct 2012
Posts: 9

nk wrote:
i found solution. thank you Guys for your support


Hi NK,

I have the similar type of problem. Can you share the solution you have found for the problem.

Thanks,
Harry
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error handling in case of TryCatch node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.