Book a Demo

Author Topic: Activity diagrams: StateNodes and instances  (Read 8626 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Activity diagrams: StateNodes and instances
« on: April 15, 2020, 08:37:17 pm »
Hey everyhopa,


In EA, StateNodes are strange beasts which are neither fully classifiers nor fully instances. You can't set a classifier for them, and you can't create instances from them.

This means that you can't connect two activities by making the start state of one be an instance of the same classifier as the end state of another.
By contrast, you can do this with events (whether you use actions or EA's hacky Send and Receive elements, they're all instances and can be linked to classifiers).

So if you're doing event-based modelling you can achieve loose coupling through common classifiers, but if you're doing state-based modelling you can't.

What are peoples' thoughts on how best to achieve loose-coupling state-based activity models?

Create my own stereotypes that look like Start and End nodes but are instances?
Create my own Start and End node stereotypes with a RefGUID tagged value to serve as the classifier?
Write scripts to brutally hack classifiers into StateNodes?
Don't try it's wrong to think that way because reasons?

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Activity diagrams: StateNodes and instances
« Reply #1 on: April 15, 2020, 09:13:48 pm »
To me a state is more some introspection of some class's operation behavior while activities target towards collaboration of different classes. In ADs you use call behaviors representing operations of a class. The same way an operation is used in state transitions. Linking both on a further level leads to maintancemania. At best I would link an SD within an AD to show that there is some other view. I guess there is no silver bullet.

q.