On this page

You can use a lifeline in a Sequence diagram to represent a property owned by a Class or a block that is the context of the diagram. Sending messages between objects specifying the properties presented by the lifelines can occur. Cameo Simulation Toolkit uses lifelines to find a source and a target object of the message. 

Lifelines and Their Objects in the Variables Pane at Run-time
Simulation console showing how lifelines can be used to find the source and target of a message.

You can use a lifeline in a SysML project to represent a nested property of a Class or a block, which is the context of a diagram. A path to the nested property appears as a dot notation on the lifeline symbol. Cameo Simulation Toolkit uses the path on the lifeline symbol to find the object.

Note

Cameo Simulation Toolkit uses a lifeline with a dot notation to represent a nested property when you record a simulation as a Sequence diagram. See Recording a Simulation as a Sequence Diagram for more information about recording a simulation.


Interaction Simulation with Lifelines Representing Nested Parts of a Diagram Context
Simulation console showing how a lifeline with a dot notation can represent a nested property.

Because Messages recorded in the system are not executed that they are internal mechanisms, Cameo Simulation Toolkit only executes Messages that are external to the system, e.g., a Message going from User Lifeline (without types) and Found Messages. All other Messages are not executed but verified and printed in the Console pane.

Information

A Found Message is a Message where the occurrence of a receiving Event is known, but the occurrence of a sending Event is not.

Executing only external outgoing Messages, e.g., User Lifeline and Found Messages.

Storing nested property paths in a model

From version 2021x Refresh2, the Lifelines used to represent nested properties have the «NestedPropertyPath» stereotype applied to them. As a result, the path of a nested property is stored in the propertyPath tag of a Lifeline. Nested property paths of the Lifelines created with an earlier version of a modeling tool are stored in diagram symbols and you should save them in the model manually as described below.


To store nested property paths of Lifelines in a model


  1. Right-click a Sequence Diagram in the Containment tree or an empty space in a Sequence Diagram.
  2. In the context menu, select Refactor > Store Nested Property Paths in the Model.



The nested property path of the selected Lifeline or the nested property paths of all Lifelines in the selected diagram are now stored in the model.

Lifeline selector

If a lifeline represents a part with the multiplicity of more than 1 (neither * nor 1..*), the list will also contain more than one object (not only one object) at runtime. The lifeline has the Selector expression that specifies the particular part represented by the lifeline.

Cameo Simulation Toolkit supports the lifeline selector which allows specifying an exact object from the Selector expression. The Selector expression will be evaluated as an index integer to get an Object from the object collection.

The ledger[3] object is selected according to the index integer of lifeline Selector 3 of the Ledger object.

If the selector of a receiver is invalid or cannot be evaluated as an index integer, e.g., "X", none of the objects will be used, and a warning message will display in the simulation console.