UML 2.6 RTF Avatar
  1. OMG Issue

UMLR — Unclear how StateInvariants on a Lifeline identify the next OccurranceSpecification

  • Key: UMLR-798
  • Status: open  
  • Source: oose Innovative Informatik eG ( Mr. Axel Scheithauer)
  • Summary:

    StateInvariants cover a Lifeline and define a Constraint. The specification says:

    17.2.3.5 StateInvariant
    [...] The Constraint is evaluated immediately prior to the execution of the next OccurrenceSpecification.

    Very well, but how is the "next" OccurrenceSpecification identified?

    My first guess was that the Lifeline would have an ordered set of InteractionFragments (both OccurrenceSpecification and StateInvariant are such fragments). But, no, there is none. events:OccurrenceSpecification is ordered, but stateInvariant:StateInvariant is not, and both are subsets of coveredBy:InteractionFragment, which is also not ordered.

    The only way I can think of is to identify the next OccurrenceSpecification by setting it as the constrainedElement of the Constraint. Actually, that really makes sense and should be mandatory.

    Suggestion
    Replace sentence in 17.2.3.5 StateInvariant

    The Constraint is evaluated immediately prior to the execution of the next OccurrenceSpecification.

    with

    The Constraint must constrain an OccurranceSpecification of the covered Lifeline. It will be evaluated immediately before this occurrance.

    Replace sentence in Notation 17.2.4.5 StateInvariant

    The possible associated Constraint is shown as text in curly brackets on the lifeline.

    with

    The possible associated Constraint is shown as text in curly brackets on the lifeline immediately above the constrained OccurrenceSpecification.

    Add a constraint to 17.12.25
    constrains_one_OccurrenceSpecification
    self.invariant.constrainedElement->size()=1
    AND
    self.covered.events->includes(self.invariant.constrainedElement->first())

  • Reported: UML 2.5.1 — Tue, 13 Dec 2022 10:56 GMT
  • Updated: Tue, 13 Dec 2022 10:56 GMT