Book a Demo

Author Topic: Cannot add transition between two state machines  (Read 6476 times)

jepessen

  • EA User
  • **
  • Posts: 106
  • Karma: +1/-1
    • View Profile
Cannot add transition between two state machines
« on: January 02, 2021, 08:24:04 pm »
Hi.

I'm trying to create a state machine diagram with two sub state machines. EA15.2 does not allow me to create a transition between them, as you can see in the image. Trying to create manually a transition selecting it from the toolbox shows me a message telling that it's not UML compliant, but I'm pretty sure that I was capable to create it in previous versions (I've simulated a state machine with many sub state machines connected between them).

What's the correct behaviour? This current or the previous where it was possible? And how can I create a state machine with many sub state machines interconnected?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Cannot add transition between two state machines
« Reply #1 on: January 03, 2021, 12:47:51 am »
I'm pretty sure you can only have transitions between states, not between state machines.

Have you tried using sub-States instead of sub-StateMachines

AFAIK a StateMachine usually doesn't have sub-StateMachines.

Looks similar to the problem some people had with Activities. EA now doesn't allow controlflows between activities anymore.

Both are good things as they follow the UML syntax.

Geert

jepessen

  • EA User
  • **
  • Posts: 106
  • Karma: +1/-1
    • View Profile
Re: Cannot add transition between two state machines
« Reply #2 on: January 03, 2021, 01:15:38 am »
Ok but I can see in the documentation (https://sparxsystems.com/resources/tutorials/uml2/state-diagram.html) that's possible to link substate machines and it should be UML compliant, at least according to specification 2.5.1 (https://www.omg.org/spec/UML/2.5.1/PDF) as seen in section 14.2.3.4.7 and figure 14.11.

Instead I've noticed that I'm able to connect directly The exitpoint of one substate machine to the entrypoint of another one. It's also be possible to add them in the shape boundary by right-click on the state machine, as you can see in figure. This way is possible to create a transition directly to an entry point, and then by double clicking on the substate machine is possible to drag the created entry point from the project browsed to inside the diagram. Maybe this is the correct way to do it, but it's a different way to link two substatemachines with transitions.

The problem now is that I'm not able to run the state machine. If I go to Simulate ribbon and then to Start, the state machine remain stuck to the initial state and it does not enter inside the substatemachine.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Cannot add transition between two state machines
« Reply #3 on: January 03, 2021, 02:54:04 am »
If you look at section 14.2.2 Abstract Syntax (figure 14.1) you can clearly see that a transition is from/to a Vertex. Subtypes of vertex are PsuedoState, State and ConnectionPointReference

The isSubMachineState property is a property of a State This is in fact a State that "executes" the reference statemachine.
You don't connect the StateMachines with transitions, but you connect States of type SubMachineState

This is similar to Actions that call an Activity (CallBehaviorAction).
The same rule here: you don't never connect Activities with control flows. You always connect Actions.

Geert

jepessen

  • EA User
  • **
  • Posts: 106
  • Karma: +1/-1
    • View Profile
Re: Cannot add transition between two state machines
« Reply #4 on: January 03, 2021, 03:25:14 am »
Ok I'll check it more in detail, thanks.