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 » General IBM MQ Support » How to notify a subflow in case of rollback?

Post new topic  Reply to topic
 How to notify a subflow in case of rollback? « View previous topic :: View next topic » 
Author Message
Base
PostPosted: Tue Jul 14, 2009 2:35 am    Post subject: How to notify a subflow in case of rollback? Reply with quote

Apprentice

Joined: 09 Apr 2009
Posts: 32

Hi,

I am developing a component which is in fact a subflow. In this subflow I am emitting events. My Problem is that I have to somehow emit events if there occurs an exception which leads the flow where my subflow is embedded to be rolled back.

But there are some restrictions:
1. The problem is that I cannot touch the initial input node to set transaction events because I can only work in my subflow (I don't know where my subflow would be used later).
2. It is also not possible to try catch the error in my subflow and passing the exception forward because it could happen that the exception could be repaired in front of my subflow - if so my subflow wouldn't be noticed.

So is there a possibility that I can notify my subflow, that an rollback (or an successfully processing) was made?
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Tue Jul 14, 2009 4:02 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

How does your subflow capture errors/events? Does it capture the exceptionlist and put it in a queue?
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
Base
PostPosted: Tue Jul 14, 2009 4:09 am    Post subject: Reply with quote

Apprentice

Joined: 09 Apr 2009
Posts: 32

MQEnthu wrote:
How does your subflow capture errors/events? Does it capture the exceptionlist and put it in a queue?


ATM there is nothing implemented. the problem is that I need to emit some events when the whole flow is rolled back without touching anything outside my subflow (so no transactional events are possible).
When I am capturing the exception then I am not allowed to change this. On the one hand I am knowing that something after the subflow went wrong but on the other hand I cannot say for sure if this exception is handled in front of my subflow. Thats the big problem.

What I can imagine is to create another flow which will do my work but I dont know how to inform this new flow about the rollback in the other one? Are there any functions to do this?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 14, 2009 4:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Maybe you should use Monitoring Events instead of trying to roll your own?
Back to top
View user's profile Send private message
Base
PostPosted: Tue Jul 14, 2009 4:52 am    Post subject: Reply with quote

Apprentice

Joined: 09 Apr 2009
Posts: 32

mqjeff wrote:
Maybe you should use Monitoring Events instead of trying to roll your own?


Sorry for explaining it wrong - I am using monitoring events. But how can emit such events in case of a rollback with the already mentioned restrictions?
Back to top
View user's profile Send private message
Base
PostPosted: Thu Jul 16, 2009 1:17 am    Post subject: Reply with quote

Apprentice

Joined: 09 Apr 2009
Posts: 32

Hm... no possibilities?
Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Jul 16, 2009 3:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Base wrote:
Hm... no possibilities?

No, it is not possible for a subflow to predict future events that may occur outside of the subflow.

It is possible to create a second message flow that consumes messages from the first message flow's backout queue, and emit events from there.
Back to top
View user's profile Send private message
Base
PostPosted: Thu Jul 16, 2009 7:26 am    Post subject: Reply with quote

Apprentice

Joined: 09 Apr 2009
Posts: 32

rekarm01 wrote:
Base wrote:
Hm... no possibilities?

No, it is not possible for a subflow to predict future events that may occur outside of the subflow.

It is possible to create a second message flow that consumes messages from the first message flow's backout queue, and emit events from there.


The Problem is that the second Subflow does not know on which target transport the origin flow is writing to (could be MQ, JMS ...).

The only thing I can do is that the main flow generates an evetn on which the second flow is listening. So the second flow knows in which flow a roll back might happen. But does Message Broker provide an API or something else where the second flow can look up which flow with which correlation id (from the event) was passed successfully?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 16, 2009 8:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You don't expect a Try/Catch node to respond differently if there is a second Try/Catch node downstream... Correct?

If your subflow is added at a given point in the flow, and a process is added further down to encapsulate and isolate errors and resolve them and then proceed successfully, and your subflow needs to generate events in that case - then your subflow needs to also be inserted at a second point in the flow.
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 » General IBM MQ Support » How to notify a subflow in case of rollback?
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.