Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Code Generation - Interaction Diagrams

During code generation from Interaction (Sequence) diagrams in a Class, Enterprise Architect applies its system engineering graph optimizer to transform the Class constructs into programmatic paradigms. Messages and Fragments are identified as two of the several action types based on their functionality, and Enterprise Architect uses the code generation templates to render their behavior accordingly.

Actions

Action

Description

See also

Action Call

A Message that invokes an operation.

Message (Sequence Diagram) Call Message Examples

Action Create

A Message with Lifecycle = New.

Message (Sequence Diagram) Message (Sequence Diagram)

Action Destroy

A Message with Lifecycle = Delete.

Message (Sequence Diagram) Message (Sequence Diagram)

Action Loop

A Combined Fragment with Type = Alt.

Combined Fragment Interaction Operators

Action If

A Combined Fragment with Type = loop.

Combined Fragment Interaction Operators

Assign To

A Call Message with a valid target attribute set using the 'Assign To' field is rendered in the code as the target attribute of a Call Action.

Call Message (Sequence Diagram)

Notes

  • To be able to generate code from behavioral models, all behavioral constructs should be contained within a Class
  • For an Interaction (Sequence) diagram, the behavioral code generation engine expects the Sequence diagram and all its associated messages and interaction fragments to be encapsulated within an Interaction element

Learn more