RHAPSODY4YOU

--Independent Rational Rhapsody Forum--
It is currently Tue Sep 07, 2010 7:22 pm

All times are UTC



Welcome
Welcome to RHAPSODY4YOU

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today.




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: "cathc all" for events?
PostPosted: Thu Feb 04, 2010 12:07 pm 
Offline

Joined: Thu Feb 04, 2010 12:00 pm
Posts: 8
Not sure I'm able to describe what I want in words, but will try.

I have a statechart with two states stateA and stateB. I have two events, evGotoA and evGotoB that will let me transition between the states.

So if I'm in stateA and generate the evGotoB state I will transiton to stateB. evGotoA will then take me back to stateA.

Now, if I'm in stateA and generate evGotoA nothing will happen and the event will be consumed "behind the scenes".

Is there a way to catch this event and say do a printout when it was not consumed by my statechart? Naturaly I could do things like a super state and use reaction in state, or I can handle it in stateA, but if I have lots of states and lots of events this becomes "cumbersome". I looking for a generic way of doing this.

Is there a way to do this?


Top
 Profile  
 
 
 Post subject: Re: "cathc all" for events?
PostPosted: Thu Feb 04, 2010 4:14 pm 
Offline

Joined: Wed May 07, 2008 3:50 pm
Posts: 94
Location: Crawley, W Sussex, England
Override the handleEvent method on every reactive class in order to catch unhandled events
In C++ this is found in OMReactive.h/.cpp known as handleEventNotConsumed()


Top
 Profile  
 
 Post subject: Re: "cathc all" for events?
PostPosted: Fri Feb 05, 2010 8:59 am 
Offline

Joined: Thu Feb 04, 2010 12:00 pm
Posts: 8
shanz wrote:
Override the handleEvent method on every reactive class in order to catch unhandled events
In C++ this is found in OMReactive.h/.cpp known as handleEventNotConsumed()


Thanks,

This would have to be done in the oxf framework then? That would give me a generic override for everyone. Is there a awy to do an individual override for only the classes where I want it? I can foresee several different uses for this so can't make one that works for all.


Top
 Profile  
 
 Post subject: Re: "cathc all" for events?
PostPosted: Fri Feb 05, 2010 10:38 am 
Offline

Joined: Wed May 07, 2008 3:50 pm
Posts: 94
Location: Crawley, W Sussex, England
No, you can choose to override or not on a class by class basis.
I only mentioned the oxf so you'd know its signature to help you override it.
http://publib.boulder.ibm.com/infocenter/rhaphlp/v7r5/topic/com.ibm.rhapsody.reference.doc/topics/rhp_r_fw_handle_event_not_consume.html?resultof=%22%68%61%6e%64%6c%65%45%76%65%6e%74%4e%6f%74%43%6f%6e%73%75%6d%65%64%22%20%22%68%61%6e%64%6c%65%65%76%65%6e%74%6e%6f%74%63%6f%6e%73%75%6d%22%20


Top
 Profile  
 
 Post subject: Re: "cathc all" for events?
PostPosted: Fri Feb 05, 2010 12:10 pm 
Offline

Joined: Thu Feb 04, 2010 12:00 pm
Posts: 8
shanz wrote:


Gotcha!

Thanks, looks to be exactly what I need.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for: