I have a question about representing a 3 state model where the 3rd state is shared by both previous (parent) states.
It is modelling a telephone. Base state is Idle phone.
events which trigger move to next state are new_call to trigger second level state Inbound_call and offhook_action which triggers move to Outbound_call level.
In Inbound_call there is ringing state. In Outbound_call level there is dialing then ringback. Both Ringing in Inbound_call and ringback in Outbound_call can transition to Connected state.
-- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared. H. S. Lahman H.la...@verizon.net software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
umlforum+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/umlforum?hl=en?hl=en
I think idle (i.e. waiting for inbound) and off-hook are
top level states. Both then have further childs. E.g. offhook
might have a children "line busy" or "speaking" etc.
Before thinking in states it is useful to start collecting triggers. What are the
triggers that can occur. Then what actions should happen. And last
how to organize the states.
Maybe you can design a state diagram and share it with us. Then
it is easer to discuss.
Nested states are no problem in general. Basically they help
to keep the drawings more compact. But you can transform every
hierarchical machine into a flat one without problems.
With best regards,
Peter
----
Code generation from state-charts made easy!
www.sinelabore.com
Harel StateCharts have been used successfully for some time by smart people with good understanding of complex synchronization requirements. That's well beyond UML tutorials.
But, only if one hadn't made up one's mind in another direction in
advance ...
--
> While tutorial principles like " Objects are supposed to be logically
> cohesive " or " [it] is far easier to manage and maintain when it is
> handled by handshaking between small, individual state machines " are
> helpful, some situations clearly require some more advanced constructs.
You may regard such things as helpful advice, but I regard them as
fundamental principles for software design.
I believe the conclusion of the last clause is far from clear. The
reason we have design paradigms and methodologies is to capture best
practices so that we don't repeat the mistakes of the past. IMO, the
notion that there are always some situations where fundamental
principles need to be violated is the same sort of NIH logic that led
people to seriously debate about special cases where GOTOs were useful
for a full decade after Djikstra's "GOTOs Deemed Harmful" note. Software
design is difficult enough without second guessing well-established
paradigms, methodologies, and good practices on a case-by-case basis.
I might timorously suggest that there is a big difference between:
1. Stating that something is a rule that one will always follow, but one
day finding oneself with a problem that one can't figure out how to
solve while following the rule and so deciding, just this once, to
violate it, but taking this as a personal failing because one didn't
figure out how to do it right.
and
2. Stating from the beginning that something is a rule except for some
cases when it is not.
The former is going to have one trying very hard to observe the rule.
The latter is going to have one deciding that this is one of the
exceptions every time things get even slightly tough.
--
======================================================================
Consulting in Architecture-Driven Modernization, Transformation,
Object-Orientation, OERA Architecture, and Best Practice
----------------------------------------------------------------------
Dr. Thomas Mercer-Hursh email: tho...@cintegrity.com
Computing Integrity, Inc. voice: 510-233-5400
60 Belvedere Avenue fax: 510-233-5446
Point Richmond, CA 94801-4023 url: http://www.cintegrity.com
======================================================================
--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
>> Software design is difficult enough without second guessing
>> well-established paradigms, methodologies, and good practices on a
>> case-by-case basis.
>
> I might timorously suggest that there is a big difference between:
>
> 1. Stating that something is a rule that one will always follow, but
> one day finding oneself with a problem that one can't figure out how
> to solve while following the rule and so deciding, just this once, to
> violate it, but taking this as a personal failing because one didn't
> figure out how to do it right.
Right. No methodology is perfect and eventually one encounters corners
where it simply doesn't work in a reasonable way. While the
methodologies are not perfect, they have evolved to the point where such
situations are quite rare.
>
> and
>
> 2. Stating from the beginning that something is a rule except for some
> cases when it is not.
>
> The former is going to have one trying very hard to observe the rule.
> The latter is going to have one deciding that this is one of the
> exceptions every time things get even slightly tough.
This is the one I have a problem with. It allows a host of motivations,
like elegance and saving keystrokes, to drive the design. Worse, it
allows converts to the OO paradigm to map antithetical principles onto
the paradigm. IOW, it invites bad OOA/D habits.
> On the contrary, I think that generalities which are always correct
> are not very helpful when different options are possible.
That's pretty much my point. One should only look for different
<methodological> options when the fundamental principles do not provide
a viable one.