Zurück zu Willert.de

Using ONLY guards for state transitions

Rhapsody Model or Codegeneration topics

Using ONLY guards for state transitions

Postby vipsy » August 31st, 2012, 12:56 pm

A very general question on state modelling.

I was wondering if it is appropriate to have state transitions based on guards ( no triggers ).I've come across models that include statemachines using only guards for state transitions,i.e basically checking the attribute values .I'd rather introduce events and use them as a trigger.For instance,generate an internal event when a class attribute changes its value from True to false.
I believe this is more event driven.
I understand using just guards on transitions are semantically correct ,as per UML, but is this a good practice ? Any cons ? Which approach is recommended ?
Posts: 8
Joined: November 24th, 2011, 2:47 am

Re: Using ONLY guards for state transitions

Postby Christian Loibl » September 10th, 2012, 4:11 pm


benefits migt be:
-less overhead runtime and RAM
-easier to implement watchdog parallel to the feature
-events are processed in the order they appear, with guards you can process them in a specified order you define in the implementation

The biggest advantage, it looks like Statemate or Matlab :yawn:
Christian Loibl
Posts: 6
Joined: August 5th, 2009, 4:46 pm

Re: Using ONLY guards for state transitions

Postby Ursanio » March 13th, 2014, 9:54 am

Hi guys,

I have been reading this post and I am wondering how many this kind of guarded transitions (without a trigger)
RXF can handle?

is there any limitation?

best regards,

Posts: 9
Joined: October 2nd, 2013, 9:40 am

Return to Modelling with Rhapsody

Who is online

Users browsing this forum: No registered users and 6 guests