Book a Demo

Author Topic: How to create a "sub" diagram for an Activity?  (Read 14744 times)

pstein

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
How to create a "sub" diagram for an Activity?
« on: October 13, 2010, 07:19:57 pm »
I got an *.eap with some Activity diagrams in it.

When I click on one of the Activities another tab opens and all the sub-activities inside the "parent" box are shown.

I wonder now how EXACTLY to create such a sub-activity diagram?

Lets start with a new activity which I drag & dropped from Toolbox.
This new Activity box has currently no sub-Activity diagram.

How EXACTLY can I tell EA to create and link a new sub-Activity diagram?

Peter

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to create a "sub" diagram for an Activity?
« Reply #1 on: October 13, 2010, 07:37:56 pm »
Peter,

Right-click on the Activity and choose Advanced/Make Composite.
Doubleclick on the Activity and add stuff to the diagram that was opened.

Geert

pstein

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: How to create a "sub" diagram for an
« Reply #2 on: October 13, 2010, 11:11:34 pm »
Quote
Peter,

Right-click on the Activity and choose Advanced/Make Composite.
Doubleclick on the Activity and add stuff to the diagram that was opened.

This seems NOT to be correct!

A sign for a composite is a lying "8" resp "glasses" symbol in the lower right corner. This is not the case here. In my Activity there is a tiny symbol like a fork. See snapshot here:

http://img215.imageshack.us/img215/2232/capture20101013135950.png

Furthermore NO "Mark Composite" is enabled.
Nevertheless I can double click on it and a sub-activity diagram is opened.
It seems to me that this is linked in another way.
The title "Activity23" is entered in Action properties->Tab "Call"->entry field Behaviour

So again the question:

How can I achieve such a linkage to a sub-activity and what is the difference to a "Composite" actiovity?

Peter

« Last Edit: October 13, 2010, 11:12:16 pm by pstein »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to create a "sub" diagram for an Activity?
« Reply #3 on: October 13, 2010, 11:32:36 pm »
Suit yourself, just note that the "Activity" you are talkin about is probably an "Action"

Geert

pstein

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: How to create a "sub" diagram for an Activity?
« Reply #4 on: October 13, 2010, 11:51:52 pm »
Quote
Suit yourself, just note that the "Activity" you are talkin about is probably an "Action"

Geert

Well, ok.

So how do I specify a "Sub-Action"?

Peter

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to create a "sub" diagram for an Activity?
« Reply #5 on: October 14, 2010, 12:14:48 am »
Quote
Peter,

Right-click on the Activity and choose Advanced/Make Composite.
Doubleclick on the Activity and add stuff to the diagram that was opened.

Geert

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: How to create a "sub" diagram for an Activity?
« Reply #6 on: October 14, 2010, 02:16:59 am »
There are a few steps so please be patient and follow carefully

1) Create an Activity element and make composite as Geert has said
2) Double click the Activity to open the "sub-diagram" and model the flow
3) Go back to the diagram used in step 1) and select the Activity and press the delete key to remove the reference to the Activity
4) Drag the Activity element created in 1) from the project browser back to the diagram and select the second radio button option Invoke Activity


Job done!

NOTE
Should the dialog not open during step 4), try holding down the control key whilst dragging the Activity element

Cheers

Phil
Models are great!
Correct models are even greater!

pstein

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: How to create a "sub" diagram for an Activity?
« Reply #7 on: October 14, 2010, 07:23:34 pm »
Quote
4) Drag the Activity element created in 1) from the project browser back to the diagram and select the second radio button option Invoke Activity
Phil

Hi Phil,
thank you. We are approaching the final solution.

However I guess you meant in step 4.)
Drag the Activity created in 2) from....

Furthermore before I am prompted for the second radio button there is another prompt:
"EA can automatically create a Port or Part attached to the target element.....New Element Type:
- port
- composite Port

See snapshot here:
http://img545.imageshack.us/img545/9673/capture20101014101538.png

What is the difference/What should I select?

Peter

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: How to create a "sub" diagram for an Activity?
« Reply #8 on: October 15, 2010, 07:12:11 pm »
I really did mean drag the Activity element from the Project Browser to the Activity Diagram

A Call Behaviour Action (what you are trying to create) is linked to an Activity element in EA. If the Activity is a composite you get the navigation to the child diagram.

By dragging the Activity element from the project browser to the activity diagram, and then chosing Invocation will work.

From the dialog you have posted, I am guessing that you are dragging the diagram to the action element?

Models are great!
Correct models are even greater!