Author Topic: SysML Activity Diagram Control Flow  (Read 12272 times)

imonk14

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
SysML Activity Diagram Control Flow
« 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.

PeterHeintz

  • EA User
  • **
  • Posts: 983
  • Karma: +58/-18
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #1 on: June 18, 2018, 06:53:14 am »
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.
Best regards,

Peter Heintz

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #2 on: June 18, 2018, 01:26:40 pm »
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
« Last Edit: June 18, 2018, 01:30:41 pm by Simon M »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13401
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SysML Activity Diagram Control Flow
« Reply #3 on: June 18, 2018, 04:58:58 pm »
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

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #4 on: June 18, 2018, 05:10:09 pm »
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
My theories are always correct, just apply them to the right reality.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #5 on: June 19, 2018, 02:29:20 pm »
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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #6 on: June 19, 2018, 03:37:48 pm »
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.

PeterHeintz

  • EA User
  • **
  • Posts: 983
  • Karma: +58/-18
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #7 on: June 19, 2018, 05:31:58 pm »
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.
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13401
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SysML Activity Diagram Control Flow
« Reply #8 on: June 19, 2018, 06:06:17 pm »
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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #9 on: June 19, 2018, 06:47:04 pm »
Yes. Annex A explicitly states that you can put anything in any diagram.

q.

Gangolf

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #10 on: July 10, 2018, 07:33:42 pm »
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?

PeterHeintz

  • EA User
  • **
  • Posts: 983
  • Karma: +58/-18
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #11 on: July 10, 2018, 10:56:10 pm »
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, ....
Best regards,

Peter Heintz

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: SysML Activity Diagram Control Flow
« Reply #12 on: July 11, 2018, 09:40:32 am »

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


We do intend posting this as a FAQ entry.
« Last Edit: July 11, 2018, 10:51:00 am by Dermot »