Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni on October 17, 2022, 04:16:34 pm

Title: Urgent - State Machine diagrams and states in multiple..
Post by: Paolo F Cantoni on October 17, 2022, 04:16:34 pm
Hi All,
In another post, BPMN & Shallow Copy of a diagram (https://sparxsystems.com/forums/smf/index.php/topic,47262.msg275647.html#msg275647), I noted that shallow copying of BPMN elements shouldn't be allowed.
From a Standards viewpoint, is the same true of State Machine elements?

We have three diagrams with a number of states (say 30 overall).  The diagrams refer to what are conceptually sub-types of a more generic type.  For those familiar with TOGAF, Incidents, Requests and Changes (TOGAF, Change Requests).  Some states have similar (if not identical names) and others are similar in nature.  So we decided to put all 30 on the same diagram and use that diagram to rationalise the list.  As soon as we did this, Sparx EA became literally unusable!  Once you open any diagram containing either the original or a copy of the state, EA stalls completely.  You can't even select an item and use the context menu in any meaningful timeframe!

So, I suspect (following some "Compare and Contrast" testing we have performed) that the same issue applies with State Machines as BPMN diagrams - except that EA's behaviour is much more disastrous!  Can anyone confirm/deny whether such shallow copies are allowed under the UML standard?

TIA,
Paolo
Title: Re: Urgent - State Machine diagrams and states in multiple..
Post by: Geert Bellekens on October 17, 2022, 06:01:28 pm
Paolo,

Yes, very much like BPMN diagrams you can't re-use states outside of their statemachine context.

Or in other words, the scope of a state is limited to the owning statemachine.

Before you ask, yes the same applies to Actions in an Activity.

Geert
Title: Re: Urgent - State Machine diagrams and states in multiple..
Post by: Paolo F Cantoni on October 17, 2022, 07:10:48 pm
Paolo,

Yes, very much like BPMN diagrams, you can't reuse states outside of their state machine context.

Or in other words, the scope of a state is limited to the owning state machine.

Before you ask, yes, the same applies to Actions in an Activity.

Geert
Thanks, Geert,
I was "starting to get the picture".

However, for the case of the problem that was "stopping us in our tracks", it doesn't seem to relate directly to the multiple diagrams for the same state, but a tiny number (1 or 2) state machine diagrams further testing and analysis has revealed.  We're going to remove the additional diagrams and recreate the diagrams that are problematic.

As Eve mentioned in the related thread, EA doesn't stop you from doing it, but could she confirm there should be no issues of the kind we've experienced?
(and yes, we ran the Project Integrity Check).

Finally, could one have multiple diagrams within the same state machine context (say, with different scenarios highlighted)?  Since we have a State Machine Diagram and a State Machine element?

Paolo
Title: Re: Urgent - State Machine diagrams and states in multiple..
Post by: Geert Bellekens on October 17, 2022, 07:39:52 pm
Regardless of how invalid the semantics of your model are, EA should not freak out like that.

I must say I've never experienced something similar to what you describe.

Yes indeed, if you have a single statemachine, I don't see why you shouldn't be allowed to create multiple diagrams showing different aspects of the same statemachine. Not sure if it's a good idea, but it certainly seems valid to me.

Geert
Title: Re: Urgent - State Machine diagrams and states in multiple..
Post by: Eve on October 18, 2022, 08:09:37 am
As soon as we did this, Sparx EA became literally unusable!  Once you open any diagram containing either the original or a copy of the state, EA stalls completely.  You can't even select an item and use the context menu in any meaningful timeframe!

As Eve mentioned in the related thread, EA doesn't stop you from doing it, but could she confirm there should be no issues of the kind we've experienced?
(and yes, we ran the Project Integrity Check).

I haven't seen anything like that happen, but I can't see any reason for it to ever happen.