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 » Multiple User Exceptions

Post new topic  Reply to topic
 Multiple User Exceptions « View previous topic :: View next topic » 
Author Message
LH33
PostPosted: Wed Feb 04, 2004 2:39 pm    Post subject: Multiple User Exceptions Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

I have a message flow that checks for several different values on input transactions. I need to format an error message for each value that is invalid. I have an error "sub-flow" that formats a message and writes it to an error queue to be logged when I throw a user exception. How can I get an error for each failed condition?

For example: If the first value is invalid, the user exception is thrown, the node is exited and the error sub-flow is called and no other conditions are checked.

Here is a sample of the code that checks for the conditions and throws the user exception:

My input value for FIL1 is 'TR' and my input value for CONDSTATUS is 1.

How can I get two error messages to be produced - one for FIL1 and one for CONDSTATUS?

Thanks!! Lisa

CODE:

IF FIL1 <> 'TR' THEN
Throw user exception values ('Invalid Work Queue Allocation sent from System.") ;
END IF;

IF CONDSTATUS = 1
THEN
Throw user exception values ('Power clue does not reflect condition status');
END IF;
Back to top
View user's profile Send private message
Missam
PostPosted: Wed Feb 04, 2004 2:57 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

All You need is to generate two different test cases for each failure and test it individually.
When a message encounters an exception it stops processing and go to error handler,so there is no way that you can encounter two user exceptions at a time.
Back to top
View user's profile Send private message
LH33
PostPosted: Wed Feb 04, 2004 3:06 pm    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Can you post an example of what you mean?

Thanks, Lisa
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Feb 04, 2004 3:09 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

You would have to do all of your checks first, keeping the status of each one internally. (In the LocalEnvironment) ??. Then at the end, see if you had any errors. If so, then build your THROW that lists all the errors you found.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Missam
PostPosted: Wed Feb 04, 2004 7:31 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

What Eddie said is correct,you need to hold all your exception messages in a local environment and throw it all at the end,
you can do like this,

IF FIL1 <> 'TR' THEN
Set OutputLocalEnvironment.Errors.InvalidQueue ='Invalid Work Queue Allocation sent from System' ;
END IF;

IF CONDSTATUS = 1
THEN
Set OutputLocalEnvironment.Errors.Powerclue='Power clue does not reflect condition status';
END IF;

and at the end check the cardinality

IF CARDINALITY(OutputLocalEnvironment.Errors.*[] > 0) THEN
concatinate all the errors in local environment here and throw user exception below
END IF;
Back to top
View user's profile Send private message
LH33
PostPosted: Thu Feb 05, 2004 5:13 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Thanks to both!!

Lisa
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 » Multiple User Exceptions
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.