Author Topic: State machine and entry/do/exit behaviors  (Read 1727 times)

Wishmaster84

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
State machine and entry/do/exit behaviors
« on: February 16, 2022, 12:26:48 am »
Hi all,

I'm working on a state machine diagram with several states. Each state will have an entry, do and exit behavior, modeled as activity diagrams. Is there a way, from the state element, to open directly the different activity diagrams from the entry/exit/do behaviors?
Is in alternative a good way to create activity diagrams as owned behaviors of the state?
Thanks

Robert van Egmond

  • EA Novice
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: State machine and entry/do/exit behaviors
« Reply #1 on: February 16, 2022, 07:03:02 pm »
Hi,
No you can not directly open diagrams from the entry/exit/do behaviours nor behaviours on transitions. This is wat you would expect, and would be an nice feature to ad when you right click on the do/entry/exit or they can make the behaviour/activity clickable. As a work around a place a diagram frame with the activities on it on the same diagram, or jou can place diagram links. But these are nor really good alternatives.

Martin Merkel

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: State machine and entry/do/exit behaviors
« Reply #2 on: October 11, 2022, 11:48:27 pm »
Hi there,
related to this, is there any way to add multiple do Behaviors to one state (do first this, then that), or would the only way be selecting an activity? I remember I had seen state machine diagrams somewhere where multiple operations were shown under do, don't remember however if this was in EA or other tools/documents.

Would look something like that:

do /
  callOpA()
  callOpB()


I've seen that I can do something like above when using the Edit Behavior and just type in text strings, however, I have operations defined for my class that is described by my state machine, and would prefer if I could just select them.

Thanks, Martin
« Last Edit: October 12, 2022, 12:47:54 am by Martin Merkel »

qwerty

  • EA Guru
  • *****
  • Posts: 13347
  • Karma: +385/-299
  • I'm no guru at all
    • View Profile
Re: State machine and entry/do/exit behaviors
« Reply #3 on: October 12, 2022, 01:40:26 am »
IIRC you can add as many as you want (they are sort of stereotyped operations). Not sure whether EA allows only one Entry and Exit (I seem to remember that had not been checked in some older releases, but I'm not using it often these days).

q.

Takeshi K

  • EA User
  • **
  • Posts: 494
  • Karma: +25/-1
    • View Profile
Re: State machine and entry/do/exit behaviors
« Reply #4 on: October 12, 2022, 11:11:16 am »
Hello Martin,

In the UML specification, a State can have only 1 entry/do/exit action each. Having multiple do actions violates the specification. EA works as the specification defined.
(But maybe you can add 2 or more do actions by using the Automation Interface.)

HTH,
--
t-kouno

PeterHeintz

  • EA User
  • **
  • Posts: 928
  • Karma: +56/-18
    • View Profile
Re: State machine and entry/do/exit behaviors
« Reply #5 on: October 12, 2022, 06:29:50 pm »
Yes, in older versions you could add many of those but now EA dose not allow it anymore, somehow to comply to UML.
Best regards,

Peter Heintz

Martin Merkel

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: State machine and entry/do/exit behaviors
« Reply #6 on: October 12, 2022, 10:33:19 pm »
Thanks for the replies.
I must admit I haven't look into the UML spec recently. I remember that in the 'old' days, having had multiple entry or exit actions, that there is no way to define a particular sequence in which the multiple actions would be executed, for the do entry, I just don't remember. Thus, the only possibility would be to reference to an activity in which I can also define the sequence of actions.
Thanks a lot anyway.
Martin