Book a Demo

Author Topic: Substates move out from under their parent states in the project browser  (Read 4199 times)

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
Has anyone else seen substates move out from under parent states in the browser?  I see it happen fairly frequently (diagrams don't change but the substate gets promoted). When it does that, the code generated with STM_C++ no longer works (the fix is easy - just move the state back to where it was in the browser).

For example, here's how it starts in the browser (StateC is a substate of StateB)

StateA
StateB
    StateC

Then something happens that causes EA to move StateC so that it is no longer a substate:
StateA
StateB
StateC

I've never caught it in the act.

- Bruce

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Maybe in a diagram containing StateB and StateC you are moving visually in the diagram the StateC outside the StateB.

This is a normal "feature" in EA: you can change the parent of an element in a diagram by drag&dropping the internal element outside the parent element (and visceversa).

Maybe you are doing that.

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
Thanks for the suggestion, however I am definitely not doing that. I've been working with this state machine for over a year, it has about fifty states, and I generate code from it using modified STM_C++ templates. I'm excruciatingly careful about everything I do in it and I am definitely not moving states around. The diagrams never change but states magically move themselves as I described. I suspect I am one of the few using the state machines and code generation features of EA, particularly the STM_C++ templates, as I've run several serious problems (look for my post on how changing the code generation templates doesn't impact the generated code using STM_C++).

I think it has to do with creating new transitions or changing existing transitions. I'm not that concerned about the cause, but I thought someone else may have insights.

Thanks again for taking the time to reply.

Bruce

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
I remember some feature once introduced into EA which made graphical moves change nesting. There is IIRC an option in that forest (ask Brother John if Robin isn't around) to turn that behavior off. It might as well be a bug. I'm using state machines only on a moderate level and never with code generation. So it might be something else as well, include bug or Sparxian thinking.

q.

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
That's one heck of a "feature." I didn't see an option based on a two-minute search. If anyone knows of a way to turn that behavior off, I'd be interested. Otherwise, I'll stay on my toes and try to control my language.