Book a Demo

Author Topic: Who to use activity diagram ?  (Read 8489 times)

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Who to use activity diagram ?
« on: May 30, 2012, 08:19:31 pm »
Hello, I'm new user on EA and I would like to generate code with activity diagram.

I have created one activity diagram and, in one operation, I'm put it in the case "Behavior".

I don't know if it's the good process but no code was generate.

Thanks to take time for yours answers.

Ps: sorry for my English (I'm french)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Who to use activity diagram ?
« Reply #1 on: May 31, 2012, 08:31:10 am »
Make sure you add the activity and a child activity diagram to a class. You can only generate code from classes.

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #2 on: May 31, 2012, 06:01:01 pm »
Yes I do (I think).

My process :

-I have create one class (naming test)
-I have add one operation (naming plop)
-With right click on the class, a have add a activity diagram
-I draw a diagram with Action and Decision element
(I think it's in this step who I make a mistake)
-I link the diagram with the operation plop. (double click on the operation -> behavior -> select behavior )

did I have the good process ?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Who to use activity diagram ?
« Reply #3 on: June 01, 2012, 09:25:37 am »
Instead of adding an activity diagram directly to the class you need to add an activity to the class (with the activity diagram under it)

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #4 on: June 01, 2012, 04:49:20 pm »
My mistake, I have add a Activity with a activity diagram , not a activity diagram.

I have not been precise with my previous message.

But they don't work.

(Do you have tutorial who they build one activity step by step ?)

Thanks for your answers

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #5 on: June 04, 2012, 09:20:30 am »
Which edition of Enterprise Architect are you running?  (E.g. Professional, Corporate, Systems, etc)
« Last Edit: June 04, 2012, 09:20:51 am by AaronB »

MMA

  • EA User
  • **
  • Posts: 63
  • Karma: +3/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #6 on: June 04, 2012, 04:32:40 pm »
1. What language are you using to generate code. Settings | Code Generation Template | Language: choose your language | Templates: select "Action", if the template is empty, then you need to create template yourself. EA by default support lots of language to generate Behavior model e.g. C/C++/C#/VBNet/Java/SystemC/Verilog/VHDL/WorkFlowScript...
2. An initial node is essential and Control Flow is the connector to use.
3. Concrete Steps:
    1. Create a  Class | Context menu | Add | Activity | with Activity Diagram
    2. Initial Node | Control Flow to Action1 | Control Flow to Final
    3. Set Action1 's Effect.
         it can either be opaque ("Effect" tab | edit something like "Print1;")
         or be a call operation (Advanced tab | kind as "CallOperation" | OK | Call tab will appear | select your defined behavior | OK)
    4. Generate code ;)

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #7 on: June 04, 2012, 07:54:55 pm »
Quote
Which edition of Enterprise Architect are you running?  (E.g. Professional, Corporate, Systems, etc)

I have the Corporate edition. Version 8.0

Quote
1. What language are you using to generate code. Settings | Code Generation Template | Language: choose your language | Templates: select "Action", if the template is empty, then you need to create template yourself.

I'm using C++ language. But I don't find the templates "Action" (Probably you don't have the same version like me)

Quote
3. Concrete Steps:
    1. Create a  Class | Context menu | Add | Activity | with Activity Diagram
    2. Initial Node | Control Flow to Action1 | Control Flow to Final
    3. Set Action1 's Effect.
         it can either be opaque ("Effect" tab | edit something like "Print1;")
         or be a call operation (Advanced tab | kind as "CallOperation" | OK | Call tab will appear | select your defined behavior | OK)
    4. Generate code ;)

you never "link" the Activity at one operation ? It's normal ?

Thinks a lot to take time at my questions !

Cisore

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Who to use activity diagram ?
« Reply #8 on: June 05, 2012, 12:14:31 am »
Hi Cisore, use Thanks instead of Thinks :-)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Who to use activity diagram ?
« Reply #9 on: June 05, 2012, 08:24:54 am »
Quote
I have the Corporate edition. Version 8.0
Then that's the problem. Generation from activity diagrams requires the Systems Engineering edition.

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #10 on: June 05, 2012, 06:41:27 pm »
Quote
Quote
I have the Corporate edition. Version 8.0
Then that's the problem. Generation from activity diagrams requires the Systems Engineering edition.

Thanks ( ;) qwerty) Simon,
One week how I don't understand why I don't arrived to generate code. And the answer are so easy ...  because it's impossible :'(

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #11 on: June 29, 2012, 06:05:47 pm »
I have one more question on this subject  ::) :
it's possible to select which diagrams what EA need to generate and which don't need to generate ?

Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #12 on: July 02, 2012, 10:12:16 pm »
up

MMA

  • EA User
  • **
  • Posts: 63
  • Karma: +3/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #13 on: July 03, 2012, 09:05:37 am »
Activity diagram code generation is based on parent Class Element.
In other words, if you generate code on the Class, then all the activity diagrams under it will be generated.

If you want to isolate some of them, you can simply create a new class(parallel to this class), move the Activity element(with activity diagram) to the new class. ;)


Cisore

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Who to use activity diagram ?
« Reply #14 on: July 03, 2012, 05:18:05 pm »
Ok
Thanks for answer !