UML 2.6 RTF Avatar
  1. OMG Issue

UMLR — Meaning of relationship between iteration clause and Lifeline.selector clau

  • Key: UMLR-53
  • Legacy Issue Number: 8700
  • Status: open  
  • Source: TMNA Services ( Jim Schardt)
  • Summary:

    UML2-rtf issue: Meaning of the relationship between the iteration clause and the Lifeline.selector clause.

    Interactions often involve the invocation of multiple instances of the same class. For example I may want and instance of my Portfolio class to invoke the currentValue method on instances of associated Asset classes that belong to an asset category (Asset.assetCategory = Stock). This way a portfolio may assess its own value by summing up the current value of all its stock assets. To model this I want to show the same message - currentValue() being sent to the selection of assets that have the assetCategory equal to "Stock."

    Does the current UML2 communications diagram notation support the following:

    A portfolio Lifeline labeled theFund : Portfolio
    An asset Lifeline labeled myAssets [assetCategory = Stock] : Asset
    This would have to represent not one but all the asset instances that had an assetCategory of Stock
    A line connecting the two Lifelines
    A message with a sequence expression that looks like:
    1 *[holding := 1..n] : assetValue = currentValue()

    Lifelines are defined to represent only one interacting entity in an interaction. However the interaction syntax for communication diagrams would indicate that the lifeline can be "multivalued."

    The need for a Lifeline to represent multiple instances for the purpose of sending a single message to all of them at some nesting level is very common.

    Suggestion: Allow the Lifeline to have a multiplicity shown within brackets as with parts. Constrain the lifeline to have multiplicity one or greater. Constrain the lifeline with a multiplicity greater than one to have a selector that can, upon applying the selector, result in a single particpant.

  • Reported: UML 2.5 — Thu, 21 Apr 2005 04:00 GMT
  • Updated: Fri, 6 Mar 2015 20:57 GMT