-
Key: UML22-1221
-
Legacy Issue Number: 7046
-
Status: closed
-
Source: PostFinance ( Karl Guggisberg)
-
Summary:
State - Constraints - errors in OCL and inconsistencies
"[1] There have to be at least two regions in an orthogonal composite state (self.isOrthogonal) implies (self.region->size >= 2)"
Delete this constraint. It is equal to Constraint [7] .
"[2] Only submachine states can have connection point references." Add the following formulation in OCL:
not(self.connection->isEmpty()) implies isSubmachineState = true
"[5] A simple state is a state without any regions. isSimple = content.isEmpty()"
OCL should be isSimple = region->isEmpty()
"[6] Acomposite state is a state with at least one region. isComposite = content.notEmpty()"
OCL should be isComposite = region->notEmpty()
"[7] An orthogonal state is a composite state with at least 2 regions isOrthogonal = (context.size() >= 2)"
OCL should be: isOrthogonal = (region->size() >= 2)
"[8] Only submachine states can have a reference statemachine. isSubmachineState = submachine.notEmpty()"
OCL should be: isSubmachineState = submachine->notEmpty()
"[9] A Protocol state (state belonging to a protocol state machine) has no entry or exit or do activity actions. entry->isEmpty() and exit->isEmpty() and doActivity->isEmpty()"
OCL should be:
let parentStateMachine = self.containingStateMachine() in if parentStateMachine->notEmpty() then if parentStateMachine->at(1).oclIsTypeOf(ProtocolStateMachine) then self.entry->isEmpty() and self.exit->isEmpty() and self.doActivity->isEmpty() endif endif
"[10] Protocol states cannot be deep or shallow history pseudo states. if oclIsTypeOf(Pseudostate) then (kind <> #deepHistory) and (kind <> #shallowHistory)"
OCL should be:
let parentStateMachine = self.containingStateMachine() in if parentStateMachine->notEmpty() then if parentStateMachine->at(1).oclIsTypeOf(ProtocolStateMachine) then (self.kind <> #deepHistory) and (self.kind <> #shallowHistory) end if end if
Furthermore, this constraint should be moved to 15.3.8, because it is a constraint for PseudoState, not for State.
-
Reported: UML 2.0 — Sun, 29 Feb 2004 05:00 GMT
-
Disposition: Resolved — UML 2.1
-
Disposition Summary:
see above
-
Updated: Fri, 6 Mar 2015 22:54 GMT
UML22 — State - Constraints - errors in OCL and inconsistencies
- Key: UML22-1221
- OMG Task Force: UML 2.2 RTF