Model Transitions

Model transitions are used when components of differing models are encountered during the validation process. For instance, Swing components can be children of certain SWT controls such as Shell or Composite. If you have an SWT application that contains Swing components and you want to validate the entire application, you would need to write an model transition. The attributes of an modelTransition are:

actf:regexp
a regular expression to match the transition target
actf:rulebase
the rulebase where the transition target's rules are defined
actf:executionPoint
the execution point to generate for this transition target

Validation rulebases are model-dependent due to different containment policies and APIs. The model transition defines a way to transition to a new set of rules for the cases where one model can contain components of another model, such as when Swing components are contained in an SWT heirarchy. The actf:regexp attribute is the key to this transition as it defines a string representing a package name for the new model. When the validation process encounters a component that is different than the current model, it tries to match the package name of the new component to a regular expression defined in a <actf:modelTransition> element. If a model transition is found, an execution point matching the one defined by actf:executionPoint is generated and the validation continues using the rules from the rulebase defined by actf:rulebase and the current target component. In this way, a validation that began with SWT components can transition to Swing components by specifying a model transition.