Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: imonk14 on June 16, 2018, 09:01:41 am
-
I just started modeling again after a few year break. The last version of SysML I used was 1.3. It seems some things have changed.
I am trying to connect activities in an activity diagram and EA won't allow it. I tried using actions instead of activities and it was allowable. However, I can't decompose actions into other actions, or at least have them inherit behavior or link an action to a lower level diagram. Is this an EA bug or a SysML constraint. Does anyone have a good work around? I am mostly just trying to draw pictures and maintain traceability between the levels of abstraction.
-
Under an activity, you usually have activity diagram, and you should have actions but not activities on an activity diagram.
Use call behaviour actions calling activities to structure your stuff.
-
Currently working at getting this added to our FAQ.
UML Activities are the container for the description of a behavior that is made up of Actions. They are not meant to be directly used within an Activity diagram and should not be the source or target of Control Flow or Object Flow connectors.
EA has traditionally allowed this anyway, but while reworking functionality for version 14 we decided that it was time to prevent it by default.
The correct way to model this is by dropping the Activity as an Invocation onto your diagram. (Ctrl+Drag from the project browser) This creates a Call Behavior Action, which creates a link to the Activity, meaning you can re-use it as many times as needed.
However, it is still possible to force EA to allow Activities to be used within an Activity flow. To do this, you need to define a UML profile containing metamodel constraints.
We have created this profile already, but the XMI is too long to post here or in a PM. Contact support if you're desperate to get the old/non-conformant/bad EA functionality back.
Import that XMI into your model
Select the Package
Select Specialize > Technologies > Publish > Import UML Profile
This adds the rule to your model that Activities are valid as the source or target of a Control Flow.
To remove the added rules from your model:
Open the Resources Window (Start > Explore > Browse > Resources)
Expand the MDG Technologies item
Right click on Activity-ControlFlow
Select Remove Technology
-
EA has traditionally allowed this anyway, but while reworking functionality for version 14 we decided that it was time to prevent it by default.
Thank you Simon, that will spare me a lot of "There are no Activities on an Activity Diagram!" lectures in the future. :)
Geert
-
EA has traditionally allowed this anyway, but while reworking functionality for version 14 we decided that it was time to prevent it by default.
Thank you Simon, that will spare me a lot of "There are no Activities on an Activity Diagram!" lectures in the future. :)
Geert
Hear hear.
/U
-
Thank you Simon, that will spare me a lot of "There are no Activities on an Activity Diagram!" lectures in the future. :)
So far it has caused me more, but it's a move I've been personally wanting for a long time.
-
Only indirectly related, but then what about classes in SDs? They are an absolute no no and cause data loss but still (?) are allowed to be created.
q.
-
Just before start making EA 100% OMG compliant, my diagrams frequently contain elements which do not fit to the to the diagram type.
In SysML I put that stuff outside the diagram frame. Those elements are typically connected via trace relationships to the “real” diagram elements.
I do that, to facilitate navigation and tractability (if not suitable possible by other EA features), an aspect which is not really covered by OMG.
So please, do not start being the restrictive.
-
I don't think the OMG restricts what kind of elements you can put on a diagram in any way.
So I guess (hope?) EA will not implement those kind of restrictions anytime soon.
Geert
-
Yes. Annex A explicitly states that you can put anything in any diagram.
q.
-
Hello,
what is the best way to deal with this new "feature" (no activities anymore in activity diagrams)?
The only way I can make use of activity diagrams now is to first add an activity from the toolbox to the diagram. Then it appears in the model (project browser). From there I can drag it to the diagram as invocation action. Then I delete the activity from the diagram.
That is not very effective. Is there a better way to do it?
Thanks, Gangolf
PS. all the docu (eg the UML 2 tutorials etc) still show activities in activity diagrams. That is pretty bad. How could you roll out such a massive change with EA 14 without updating the docu?
-
Hi,
this is what I do since years.
-I select the package in the project browser, I want to contain the activity
-I add within the project browser an Activity ("Add Element...")
-I select the added Activity in the project browser
-I choose "Add/Composite Structure Diagram"
-I fill the Composite Structure Diagram with Actions, Objects, Pins, ....
-
We have created this profile already, but the XMI is too long to post here or in a PM. Contact support if you're desperate to get the old/non-conformant/bad EA functionality back.
Import that XMI into your model
Select the Package
Select Specialize > Technologies > Publish > Import UML Profile
This adds the rule to your model that Activities are valid as the source or target of a Control Flow.
To remove the added rules from your model:
Open the Resources Window (Start > Explore > Browse > Resources)
Expand the MDG Technologies item
Right click on Activity-ControlFlow
Select Remove Technology
For access to the XML file see:
Activity-controlflow.xml (https://sparxsystems.com/downloads/resources/activity-controlflow.xml)
We do intend posting this as a FAQ entry.