UML 2.4 RTF Avatar
  1. OMG Issue

UML24 — bodyCondition and isQuery

  • Key: UML24-84
  • Legacy Issue Number: 15501
  • Status: closed  
  • Source: NASA ( Dr. Maged Elaasar)
  • Summary:

    Constraint [7] in Kernel::Operation says:

    "A bodyCondition can only be specified for a query operation"

    Let us look at the definition of isQuery and bodyCondition:

    bodyCondition: Constraint[0..1]
    An optional Constraint on the result values of an invocation of this Operation.

    isQuery : Boolean
    Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false).


    I am not sure why specifying a condition on the result of an operation is only limited to operations with no side effects. What is wrong with specifying a condition on the result of a non-query operation?

  • Reported: UML 2.3 — Mon, 13 Sep 2010 04:00 GMT
  • Disposition: Resolved — UML 2.4
  • Disposition Summary:

    Body conditions are already a major source of logical uncertainty and inconsistency between OCL and UML. Relaxing
    their usage would only make this worse: the OCL spec states “An OCL expression may be used to indicate the result
    of a query operation”.
    This also resolves 15768.
    Disposition: Closed - No Change

  • Updated: Fri, 6 Mar 2015 20:58 GMT