Code Generation - Interaction Diagrams

Note:

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.

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 one of the several action types based on their functionality, and Enterprise Architect uses the EASL code generation templates to render their behavior accordingly. For example:

A Message that invokes an operation is identified as an Action Call and is rendered accordingly

Combined Fragments are identified by their types and conditions; for instance, an Alt fragment is identified as an Action If, and a loop fragment is identified as an Action Loop.

For more information on the EASL code generation macros and templates Enterprise Architect uses to generate code from behavioral models see the EASL Code Generation Macros topic.