Customization > Automation Interface > Object Attributes and Associations > Role (automation interface)
  
Role (automation interface)
A Role is one end of an Association.
ATTRIBUTES
In addition to the common attributes.
Access
This indicates the visibility of the Role. Possible values are Public, Protected, Private or Package.
By default the Access will be Private.
Access is read/write.
Association End
This indicates which end of the related Association the Role appears. Possible values are Start or End.
Access is read/write.
Default Value
A string indicating the default value for this role.
Access is read/write.
Description
A textual property that gives an overview of the dictionary item.
Access is read/write.
Is Behavior
Indicates that a Role modeled Port is a behavior Port. Possible values are TRUE and FALSE.
Access is read/write.
Is Composite
Indicates that this role is composite: derived from the Association. Possible values are TRUE and FALSE.
Access is read/write.
Is Conjugated
Indicates that a Role modeled Port is a conjugated Port. Possible values are TRUE and FALSE.
Access is read/write.
Is Derived
Indicates that a Role is derived. Possible values are TRUE and FALSE.
Access is read/write.
Is Port
Indicates that the Role represents a port. Possible values are TRUE and FALSE.
Access is read/write.
Is Service
Indicates that a Role modeled Port is a service Port. Possible values are TRUE and FALSE.
Access is read/write.
Is Unique
Indicates that this role uniquely identifies the Actor or Class object (Class, Data Type, Interface or Signal). Possible values are TRUE and FALSE.
Access is read/write.
Multiplicity Text
This specifies the multiplicity of the end of the related Association to which the role applies. Set as follows for the values available in the drop-down list on the Association's Property Pages:
ZERO or ONE
ZERO or MORE
only ONE
ONE or MORE
TBD
Other values represent a User Defined value. For example, 12 to 15 or Thirteen.
When working with redefinitions of a Role, use My Multiplicity.
Access is read/write.
My Multiplicity
This specifies the multiplicity of the Role. Set as follows for the values available in the drop-down list on the Role's Property Pages:
0..1
*
1
1..*
For TBD End Multiplicity UML is blank.
Other values represent a User Defined value. For example, 12 to 15 or Thirteen.
Access is read/write.
Qualifier
The name of the Qualifier at the end of the related Association to which the Role applies.
Access is read/write.
Read Only
Specifies that the Role is read only, that is, a constant. Possible values are TRUE and FALSE.
Access is read/write.
Role Name
The name given to the Role - if none is given, this is the name of the associated Actor or Class object (Class, Data Type, Interface or Signal).
Access is read/write.
Storage
This indicates the C++ storage mechanism used by the Role. Possible values are On Instance or On Class.
By default, the Storage is On Instance.
Access is read/write.
Visibility
Note that for a Role object, the Visibility attribute is derived from the Access attribute. When you set the Visibility property of a Role in Modeler, Modeler sets the Access attribute.
Access is read-only.
ASSOCIATIONS:
In addition to the common associations.
Applied Comment
Relationship to Comments that are applied to the Role.
Multiplicity is 0+, access is read/write.
Applied Constraint
Relationship to Constraints that are applied to the Role.
Multiplicity is 0+, access is read/write.
Associated Item
Used by the AddDirected function to add an Association (item) between the Role (as a Part or Port) and another valid item.
Multiplicity is 0+, access is write only.
Association
A relationship with the Role's Association.
Multiplicity is 0-1, access is read/write.
Best Part Equivalent
When used with the Item, ItemEx or Items function, returns the Part that is the nearest equivalent part to the item that is specified as the index for the function. Note that virtual redefinitions inherit their properties from real redefinitions.
See also, Part Equivalent.
Multiplicity is 0+, access is read-only.
Class
A relationship with the Actor or Class object (Class, Data Type, Interface or Signal).
Multiplicity is 1, access is read/write.
Container
A relationship to the Actor, Class object (Class, Data Type, Interface or Signal), Part or Port that contains the Role (as a Part or Port).
Multiplicity is 0-1, access is read-only.
Inherited Association
A collection of Associations that the Role (as a Part or Port) inherits.
Note that Associations that are directly linked to the Role (as a Part or Port) are not included in this collection. See Local Association.
Multiplicity is 0+, access is read-only.
IO Flow From
Deprecated collection of IO Flows that originate from the Role.
Multiplicity is 0+, access is read/write.
This association is used only in models that have been migrated from Studio 8.0 or earlier. See Sourced Flows.
IO Flow To
Deprecated collection of IO Flows that end at the Role.
Multiplicity is 0+, access is read/write.
This association is used only in models that have been migrated from Studio 8.0 or earlier. See Targeted Flows.
Local Association
A collection of Associations that are linked to the Role (as a Part or Port).
Note that Associations that the Role (as a Part or Port) inherits are not included in this collection. See Inherited Association.
Multiplicity is 0+, access is read-only.
New Part Type
This association allows you to retype a Role (as a Part or Port) without losing the Part or Port's dependencies or associations.
When using the New Part Type association to retype a Part or Port, the following rules apply:
The Part or Port that is to be retyped must be in the class model.
The Part or Port that is to be retyped must be typed by a Class or an item that is based on a Class, such as a SysML Block.
The Part or Port that is to be retyped must not be a redefinition.
The Part or Port can be retyped only by a Class or an item that is based on a Class, such as a SysML Block.
In the following example, Part1 is retyped using Class2:
Set objItem =
Dictionary.
Item("Attribute", "Part1")
Set objNewType =
Dictionary.
Item("Class", "Class2")
objItem.Add "New Part Type", objNewType
Multiplicity is 0-1, access is write-only.
Other Class
A relationship with the Actor or Class object (Class, Data Type, Interface or Signal) at the other end of the related Association.
Multiplicity is 1, access is read-only.
Other Role
A relationship with the Role at the other end of the related Association.
Multiplicity is 1, access is read-only.
Owned Comment
Relationship to Comments that are owned by the Role.
Multiplicity is 0+, access is read/write.
Owned Constraint
Relationship to Constraints that are owned by the Role.
Multiplicity is 0+, access is read/write.
Part
A collection of Parts (attributes and roles) that are contained by the Role (as a Part or Port).
You must use the AddDirected function to add a Part through this association.
Multiplicity is 0+, access is read/write.
Part Equivalent
When used with the Item, ItemEx or Items function, returns the Part redefinition (if there is one) for the Part specified as the index for the function.
When used with the AddDirected function, creates a Part redefinition of the Part specified as the index for the function.
See also, Best Part Equivalent.
Multiplicity is 0+, access is read/write.
Port
A collection of Ports (attributes and roles) that are contained by the Role (as a Part or Port).
You must use the AddDirected function to add a Port through this association.
Multiplicity is 0+, access is read/write.
Sourced Flows
A collection of IO Flows for which the Role is the source.
Multiplicity is 0+, access is read/write.
Targeted Flows
A collection of IO Flows for which the Role is the target.
Multiplicity is 0+, access is read/write.