Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: utilisateurEA on May 04, 2010, 07:31:57 pm

Title: State machine and profile
Post by: utilisateurEA 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.
Title: Re: State machine and profile
Post by: Paolo F Cantoni 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
Title: Re: State machine and profile
Post by: utilisateurEA 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)
Title: Re: State machine and profile
Post by: Paolo F Cantoni 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
Title: Re: State machine and profile
Post by: utilisateurEA 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 !
Title: Re: State machine and profile
Post by: Eve 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.
Title: Re: State machine and profile
Post by: Paolo F Cantoni 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
Title: Re: State machine and profile
Post by: KP 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 (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/built_in_diagram_types.htm) for the full list.