3

In an UML 2.5 State Machine, how can I model sending a Signal as an effect on a transition in a convenient way?

In one of the older UML versions you simply prefixed the name of the signal with a send keyword in the effect part of the transition specification, like:

response [buffer.size>N] / send request

But in UML 2.5 the effect must be a Behavior, either an Activity, Function, Interaction, ProtocolStatemachine, StateMachine or Opaque (just uninterpreted text). Which makes authoring a communication protocol state machine very cumbersome. Let alone using it to design in it.

I think I have collected virtually all available books about this subject and if there is a convenient way to do it, it uses a descendent of Telelogic's Tau (Either IBM Rational Rose UML/SDL family or Rhapsody, I'm not sure) which is essentially derived from the ITU SDL 2000 specification method. But I'ld like to stay close to UML 2.5 as possible.

Further more I know that the ITU has mandated the development of a UML profile to facilitate the transition from SDL to UML, but this aspect wasn't clearly addressed.

Aside: In the terminology of UML 2.5 there is an important, albeit, implicit distinction between a "protocol" and a "communication protocol". UML explicitly states that a "protocol" is the way the operations of a class are (supposed) to be used. Which leaves a "communications protocol" implicitly to be the prescription on how to communication between entities. (end of aside)

Anyone?

  • 1
    Notorious down voters :-( Anyhow, I always found the terminology Event, Signal, Trigger in UML very confusing. Hope someone has a good answer here. – qwerty_so Dec 6 '19 at 16:25
  • I just skimmed the UML 2.5 spec for communication protocol but could not find any trace. Can you elaborate on what you're refering with your Aside? – qwerty_so Dec 6 '19 at 20:52
  • @qwerty_so To clarify, with regard to the notion of communication protocol in the sense I described above, you are completely right; there is no definition of it in UML and UML 2.5. specifically. I only hoped that people wouldn't confuse the UML notion of "protocol" with my definition of "communication protocol". Because I encountered that confusion already in the literature and online. – nanitous Dec 7 '19 at 11:50
  • @qwerty_so Wikipedia as a useful definition of both: UML 2.5 obviously refers to the en.wikipedia.org/wiki/Protocol_(object-oriented_programming) and the other is en.wikipedia.org/wiki/Communication_protocol respectively. – nanitous Dec 7 '19 at 11:51
  • @qwerty_so w.r.t to the distinction between an Signal and Event, I understand the confusion Take a look at the standard (omg.org/spec/UML/2.5.1/PDF) §13.3.2 Figure 13.2 Events, shows that a Signal derives from Event via 2 subclasses. So, a Signal is an Event. The important property of a signal is that it represents an asynchronous and non-blocking data carrying Event from one object to another (§10.3.1.1. Signals). The other way around, an Event is an abstraction of a Signal. – nanitous Dec 7 '19 at 12:04
0

If I see it right, a Signal is sent by a Trigger which is part of an AD. The Trigger has that Signal as one of its properties. And they are just created there. So I guess that you can not create a Signal from within a state transition. It's only the other way around that you react on Signals in a SM.

I'm not that expert in SMs but you're probably after having another concurrent SM make a transition when that specific one happens. I guess that's somehow possible (I could imagine using a guard here), but I can't really answer that part. Maybe it 'triggers' someone else :-)

  • Not quite correct: A 'Trigger' is part of a transition specification, specifying at which occurrence of a specified Signal or Event the transition will happen. And a Signal has no Trigger as a property. But you could say that a Trigger can have a specific association (reference) to a Signal; i.e. the Signal on which the transition will trigger! – nanitous Dec 11 '19 at 11:33
  • to keep this post on the subject, my question wasn't about modeling triggering transitions with Signal; that's easy. But how do I model sending a Signal as the effect of a transition, without going through al kinds of complicated modelling. Since previous versions of UML allowed to do that. (See OP) – nanitous Dec 11 '19 at 11:36
  • Yes, I know that you want to send a signal and I explainted that this is not possible. – qwerty_so Dec 11 '19 at 18:27
  • Cross check UML/implementation in Enterprise Architect. You are right and it's wrongly swapped above. Will fix. – qwerty_so Dec 11 '19 at 18:34
  • EA is nice example of an UML tools in which using signals in a state machine or message sequence diagram is quite cumbersome. It is fine for structural modelling and low-level behavioural modelling. But I dropped it in favour of MagicDraw, which support UML 2.5 (EA 15 still only supports 2.1) and has better support for signals. Although it isn't ideal either; I reported a load of issues regard divergences with respect to the standard and incongruous design choices. – nanitous Dec 13 '19 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.