Hi,
I wanted to get back to the original aspect, for all the different cases we need to handle:
1) Superclass: No state machine, Subclass: No state-machine
2) Superclass: State machine, Subclass: No state-machine
3) Superclass: No state machine Subclass: State machine
4) Superclass: State machine, Subclass: State machine
We now need to decide what should happen for each of the 4 different cases when:
a) The generalization is established
b) A state machine is created in the superclass after the generalization has been established (only applicable to case 1 and 3)
c) A state machine is created in the subclass after the generalization has been established (only applicable for case 1 and 2)
d) A state machine is removed from the superclass after the generalization has been established (only applicable to case 2 and 4).
e) A state machine is removed from the subclass efter the generalization has been established (only applicable for case 3 and 4)
f) The generalization is removed
For b) and d) we also need to consider when these changes to a superclass are made "off-line" from any of the subclass(es), e.g. when the superclass is stored in a separate model, so the change is not detected until the model with subclass(es) actually is loaded.
For the legacy tooling this was a bit more easy, since it only had to deal with case 4). What has been discussed so far in this mail-thread is only case 2) in combination with a) and c).
So for a) we have
1) Do nothing (related to state-machines)
2) What this mail thread is all about. What should really happen here?
3) Should this even be allowed?
4) Automatically establish the redefinition relationships, remove the pre-created elements in the subclass state-machine (since they now can be inherited from the superclass)
For c) we have
1) Should this even be allowed?
2) Automatically establish the redefinition relationships, no need to pre-create any elements in the subclass state-meachine (this is what was demonstrated in Christians video).
I guess we need to elaborate a bit more on all the other combinations, what makes most sense.
/Peter Cigéhn