|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Callableflow - exception handling |
« View previous topic :: View next topic » |
Author |
Message
|
lonesheep |
Posted: Thu Dec 07, 2017 12:00 pm Post subject: Callableflow - exception handling |
|
|
Novice
Joined: 12 Sep 2017 Posts: 21
|
Hi,
I maybe doing something really stupid, but I'm trying to figure out if an exception can be returned to the calling flow with the calling flow knowing it has returned in error without having to examine the response (i.e. automatically routing to the catch / failure terminals).
For instance if I have Flow A, which invokes the callable Flow B.
In the execution of Flow B I have the following nodes;
CallableInput
Compute
CallableReply
In the compute node I just throw an exception, i.e.
THROW USER EXCEPTION CATALOG 'MyCatalog' MESSAGE 1234 VALUES ('eSQL throw error');
Control is returned to Flow A, but the flow continues down the "out" terminal rather than routing to the "failure" or "catch" terminals.
Regards |
|
Back to top |
|
 |
martinb |
Posted: Tue Dec 12, 2017 12:29 am Post subject: |
|
|
Master
Joined: 09 Nov 2006 Posts: 210 Location: UK
|
Hi
When using a CallableFlowInvoke I do see an exception thrown in the called flow propagated in the ExceptionList from the CallableFlowInvoke's Failure terminal.
Note I don't have any catch logic, or the Catch terminal of the Callable Input node in my called flow wired. |
|
Back to top |
|
 |
emarshah |
Posted: Tue Dec 12, 2017 9:14 pm Post subject: Re: Callableflow - exception handling |
|
|
Newbie
Joined: 27 Feb 2010 Posts: 4
|
lonesheep wrote: |
Hi,
Control is returned to Flow A, but the flow continues down the "out" terminal rather than routing to the "failure" or "catch" terminals.
|
True that, callable invoke doesn't come back with exception-list, though it comes with message as required.
As this callable message flows aren't complete replica of calling message flows inside other message flow.
What could be better option is to always handle the exception in the flow itself and return back with some sensible message to the calling message flow. Depending on your exception handling pattern, you can store it and reply back with proper error message in response.
I am not sure, whether the current behavior of callable message flows is intended or its a bug.
Thanks. |
|
Back to top |
|
 |
martinb |
Posted: Tue Dec 12, 2017 11:30 pm Post subject: |
|
|
Master
Joined: 09 Nov 2006 Posts: 210 Location: UK
|
Hi,
Quote: |
True that, callable invoke doesn't come back with exception-list,...
...
I am not sure, whether the current behavior of callable message flows is intended or its a bug. |
To be clear that is not the behavior I see with 10.0.0.11.
An uncaught exception in the called flow will results in the CallableFlowInvoke's Failure terminal propagating with ExceptionList. |
|
Back to top |
|
 |
emarshah |
Posted: Wed Dec 13, 2017 1:06 pm Post subject: |
|
|
Newbie
Joined: 27 Feb 2010 Posts: 4
|
martinb wrote: |
Hi,
To be clear that is not the behavior I see with 10.0.0.11.
An uncaught exception in the called flow will results in the CallableFlowInvoke's Failure terminal propagating with ExceptionList. |
I am using
Version: 10.0.0.8
Build id: 10.0.0.8-20170307-0628
and can't see the ExceptionList being build up in the message from Failure terminal. I will upgrade and can comment further on this. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|