Author Topic: State machine and profile  (Read 4411 times)

utilisateurEA

  • EA User
  • **
  • Posts: 57
  • Karma: +0/-0
    • View Profile
State machine and profile
« on: May 04, 2010, 07:31:57 pm »
Hello,

I am trying to create a profile with a composite diagram.
The "son" diagram must be a State Machine diagram.

I created a profile where, in my diagram type part, I created a metaclass object named Diagram_StateMachine and a stereotype object linked with an extends.
The name of the stereotype object is the name of my kind of diagram.

If in my metaclass I write Diagram_Sequence or Diagram_Use Case I have the correct type of diagram (seq or Use case). Every diagram works except State Machine. Do you know how to do it (maybe there is a particuliar way to write State Machine ? (but I tried a lot of combinations))

Thank you.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: State machine and profile
« Reply #1 on: May 04, 2010, 08:19:05 pm »
Which combinations did you try?  Just for interest's sake.

However, it seems to me that if you want your stereotyped element to have a __defaultDiagramType to be one of the existing diagram "types".  You should be able to just set the _defaultDiagramType attribute to the appropriate initial value.

I think (but who knows with EAUI) that you only need to «extend» the Diagram_XXXX metaclass if you are defining a new type of diagram.

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

utilisateurEA

  • EA User
  • **
  • Posts: 57
  • Karma: +0/-0
    • View Profile
Re: State machine and profile
« Reply #2 on: May 04, 2010, 09:18:30 pm »
Quote
Which combinations did you try?  Just for interest's sake.

What do you mean ?

Quote
However, it seems to me that if you want your stereotyped element to have a __defaultDiagramType to be one of the existing diagram "types".  You should be able to just set the _defaultDiagramType attribute to the appropriate initial value.

I don't want exactly a State Machine. I want a customised state machine with the appearance of a classic one (the icon in the project browser for example)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: State machine and profile
« Reply #3 on: May 04, 2010, 10:48:13 pm »
Quote
What do you mean ?
You said you used various combinations of "State Machine"...

Which ones?

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

utilisateurEA

  • EA User
  • **
  • Posts: 57
  • Karma: +0/-0
    • View Profile
Re: State machine and profile
« Reply #4 on: May 04, 2010, 11:44:12 pm »
I was probably not clear : I just meant that I tried several ways to write Diagram_StateMachine like Diagram_State_Machine or Diagram_State Machine.
Nothing extraordinary !

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: State machine and profile
« Reply #5 on: May 05, 2010, 08:42:47 am »
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/defining_child_diagram_types.htm gives the list of valid values for _defaultDiagramType.

From that I believe you want 'UML Behavioral::State Machine' without the quotes.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: State machine and profile
« Reply #6 on: May 05, 2010, 09:59:25 pm »
Quote
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/defining_child_diagram_types.htm gives the list of valid values for _defaultDiagramType.

From that I believe you want 'UML Behavioral::State Machine' without the quotes.
Simon,

That's not utilisateurEA's problem...  defaultDiagramType was a side issue.  Sorry.  I was just trying to supply a work around.

His problem is "what do you name the Metaclass from which you extend to define the child diagram?"

utilisateurEA can you confirm that?

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

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: State machine and profile
« Reply #7 on: May 06, 2010, 09:07:20 am »
Quote
Hello,

I am trying to create a profile with a composite diagram.
The "son" diagram must be a State Machine diagram.

I created a profile where, in my diagram type part, I created a metaclass object named Diagram_StateMachine and a stereotype object linked with an extends.
The name of the stereotype object is the name of my kind of diagram.

If in my metaclass I write Diagram_Sequence or Diagram_Use Case I have the correct type of diagram (seq or Use case). Every diagram works except State Machine. Do you know how to do it (maybe there is a particuliar way to write State Machine ? (but I tried a lot of combinations))

Thank you.
Diagram_Statechart. See this page for the full list.
The Sparx Team
[email protected]