Prev Next

Generate Properties From Block Associations

On a SysML Block diagram, an Association between two Block elements has ends that are represented by properties. If an Association end is navigable, the property that represents it is owned by the Block element at the other end of the Association.

In Enterprise Architect you can automatically create Part elements to represent these owned properties, in one of two ways:

  • Create a Part Association between two Blocks which will generate an anonymous Part property on the target Block
  • Create a Reference Association between two Blocks which will generate an anonymous Reference property on the target Block
  • Create a directed Association ('Start > View > Preferences > Links > select 'Association default = source --> target' checkbox'), which generates an anonymous Reference property on the source Block element
  • Create an Association between two Blocks, give either (or both) Association End Roles a name, then go to the 'Internal Block Diagram' of the other end and select 'Synchronize Structural Elements' from the diagram's context menu (that is, after naming the target end role, go to the 'Internal Block Diagram' of the source element and Synchronize to create the property)

In both cases, the Part property is considered to be bound to the Association End property – they represent the same property, so changing one updates the other, either automatically or at the next synchronization; that is, if you change the Association Source Role name, multiplicity or Aggregation setting, the Part name, multiplicity and isReference setting are updated; if you change the Part details, the Association properties are updated.

If you want to change the binding of a Property to an Association, or bind existing Associations and Properties that are not yet bound to each other, right-click on the Property in:

  • The Project Browser, and select 'Add | Bind to Connector Role', or
  • The Internal Block diagram and select 'Advanced | Bind to Connector Role'

In each case the 'Choose Connector Role to Bind' dialog displays, listing the Associations issuing from the parent Block element. Select the Association to bind the Property to, and click on the OK button.

If you subsequently delete an Association that is bound to a property, when you save the diagram you are prompted to confirm whether to also delete the property or keep it, unbound to a connector. If the property element is locked, it cannot be deleted.

Notes

  • You can create an Association connector on a SysML Block diagram by dragging the Reference Association icon from the Toolbox or selecting the Association option from the Quick Linker arrow drop-down list
  • Associations have direction when it is explicitly selected on the connector Properties, when the connector has assigned Source and Target roles, and/or when the Association default = source --> target checkbox is selected on the 'Preferences' dialog