Book a Demo

Author Topic: Multiple activity instances in act. diagram  (Read 7330 times)

RobCDeJong

  • EA User
  • **
  • Posts: 29
  • Karma: +4/-0
    • View Profile
    • Soltegro site
Multiple activity instances in act. diagram
« on: March 14, 2012, 08:52:00 pm »
In a SysML activity diagram I want to add an activity twice. EA reports:
"This diagram already contains an instance of the element you are trying to paste.
Currently, only one instance is supported, so you cannot paste the element here".

According to the SysML spec, this should be possible. Is there a work around for this issue?

I am using EA 9.2.

Cheers,
Rob
« Last Edit: March 14, 2012, 09:14:10 pm by RobCDeJong »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Multiple activity instances in act. diagram
« Reply #1 on: March 14, 2012, 10:44:39 pm »
You should never use activities on an activity diagram.
Always use actions.
Via the action kind you can choose to make an action that invokes an activity.

Geert


RobCDeJong

  • EA User
  • **
  • Posts: 29
  • Karma: +4/-0
    • View Profile
    • Soltegro site
Re: Multiple activity instances in act. diagram
« Reply #2 on: March 15, 2012, 12:00:21 am »
Geert, the same is true for actions. When a diagram already contains an action you cannot add another instance of the same action.

The diagram cannot handle two instances of the same action of activity.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Multiple activity instances in act. diagram
« Reply #3 on: March 15, 2012, 12:14:30 am »
Yes and for good reason. You can add two actions invoking the same activity.
These actions aren't the same because they have different relations (transitions) so it's good that there are two instances.

Geert

RobCDeJong

  • EA User
  • **
  • Posts: 29
  • Karma: +4/-0
    • View Profile
    • Soltegro site
Re: Multiple activity instances in act. diagram
« Reply #4 on: March 15, 2012, 08:41:46 pm »
Thanks!

Luis J. Lobo

  • EA User
  • **
  • Posts: 252
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: Multiple activity instances in act. diagram
« Reply #5 on: March 23, 2012, 11:20:55 am »
Hi Geert (if you read this...)

When you say "You should never use activities on an activity diagram. Always use actions."...

...do you mean in SysML or in a general-modelling way?

I think this is a good idea, but I don't know if it's UML compliant...

Thanks in advance!

Luis.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple activity instances in act. diagram
« Reply #6 on: March 23, 2012, 11:31:47 am »
Quote
Hi Geert (if you read this...)

When you say "You should never use activities on an activity diagram. Always use actions."...

...do you mean in SysML or in a general-modelling way?

I think this is a good idea, but I don't know if it's UML compliant...

Thanks in advance!

Luis.
Luis,

BPMN (if I understand it correctly, allows business processes to be decomposed into Activities (really Tasks - which are atomic {like Actions}) and Sub-Processes (which are composite).

The problem is that the various profiles take a slightly different view of the way they model the same behaviour.

As a thought experiment, pick a simple business process and model it in the three technologies:  UML, SysML and BPMN.

I strongly suspect that Geert's rule - which could be expressed as "use ONLY atomic behaviours at the leaf level (use a call behaviour to invoke externally) - is necessary at implementation time really only applies to the PSM level of model (which I believe Geert deals in extensively).

At the CIM level, it's hard to not be able to allow nested composite behaviours.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Luis J. Lobo

  • EA User
  • **
  • Posts: 252
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: Multiple activity instances in act. diagram
« Reply #7 on: March 23, 2012, 12:05:35 pm »
Totally agree.

The interpretation "use ONLY atomic behaviours at the leaf level (use a call behaviour to invoke externally)" is perfect, but if you analyze an Activity diagram, the main artifact is an Activity, not an Action...

I think that it depends on the abstraction level (--> notation) your're using/working. Neither more or less...

On SysML context, the Action should be the best approach.

Sorry for my english at 02:05 am in spain.......  :-/

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Multiple activity instances in act. diagram
« Reply #8 on: March 23, 2012, 07:24:55 pm »
No I actually meant "do not use Activities on Activity diagrams".
The more I use UML the more I'm convinced that Activities are meant as a container for an activity diagram, and not to be used on such diagram.
Similarly, you are usually not using Interactions on sequence diagrams, and you are also not putting State Machines on State Machine Diagrams.

Using Activities on activity diagram always gets you in trouble as you cannot distinguish the different occurrences on the different diagrams. So all transitions on all diagram go to and from the single Activity, although they might be used in completely different contexts.

Consider this:
- Delete the (activity) diagrams from your model.
- Can you still reconstruct all the essential information such as which paths you can follow (and which paths you can't)?
- Would you still be able to recreate the essence of the deleted diagram (not the layout of course) from the info in the model?

If the answer to these questions is NO then you are doing something wrong.

Geert

PS. I've started a blog post about this very topic, that I never finished. Maybe its time to write that one after all.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Multiple activity instances in act. diagram
« Reply #9 on: March 23, 2012, 09:12:33 pm »
I always see an Activity as as scenario from a use case while Actions are the single steps inside an Activity. From that perspective it actually does not make sense to place an Activity twice on a diagram.

q.

Luis J. Lobo

  • EA User
  • **
  • Posts: 252
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: Multiple activity instances in act. diagram
« Reply #10 on: March 23, 2012, 09:42:55 pm »
I understand...

Thanks.