|
|
JSON Messages |
This is the basic type of message that appears on sequence diagrams and may be either synchronous (operation) or asynchronous (event). Note that only realized messages and lifelines are supported.
Messages are custom JSON objects with the following attributes
· type = “Message”
· msgType = “OPERATION/EVENT” (case sensitive)
· srcCls = [full path to classifier sending the message]
· tgtCls = [full path to classifier receiving the message]
· srcName (Optional)
· tgtName (Optional)
· msgElement (the operation or event) *
· msgArguments
*This may be a simple name or a signature – see below
These attributes should specify the full path to the classifier to add to the diagram as a lifeline. For reflexive messages, use the same value for the source and target.
These attributes are optional and are used to specify the name of the lifeline.
The msgElement attribute specifies the operation or event that maps to the message. The importer will check the target classifier for the element specified. For the most part simple names are sufficient, however Rhapsody does allow multiple operations with the same name but different arguments / return types. If the JSON contains such artifacts, then use the signature of the operation to identify the correct one (only the types should be included). The example below illustrates this (however in this example it is not needed as there is only one checkCurrentSpeed operation). An empty argument list is also permissible as shown in enableCruiseControl.


This is a comma-separated list of
strings for Rhapsody to display in the sequence diagram and is entirely
separate from the actual arguments of the realized operation / event
(see below).
