Marked Up Class to Service Transformation

This transformation accepts a top level UML class with a stereotype ClassToService::service (or the keyword, service) and generates an interface, an implementation class and a factory class by carrying out the following mappings:

A top level class is a class that is contained directly in a package or a model. An inner class which is contained in another class is not a top level class.

If you choose a model or a package as the source, the transformation generates output classes for each of the top level classes in the model or the package.

This transformation uses a set of rules and sub-transforms to carry out the above mappings.


Running the Transformation

To run the transformation:

  1. Start the run-time workbench.
  2. In the run-time workbench, create an UML model containing a class with a few attributes and operations. This is your source model.
  3. In the run-time workbench, create another UML model with a package in it. This is your target model.
  4. Apply the ClassToService profile to the source model.
  5. Apply the stereotype service to one or more classes in the source model.
  6. Right-click a class, a package, or the model in the source model; then click Transform > Run Transformation > Marked up Class to Service.
  7. In the Run Transform window, on the Target page, select the package in the target model or the target model itself.
  8. Click Run.

For each class with a stereotype ClassToService::service, the transformation generates the interface, implementation and factory classes and places them in the specified target package. If you choose the target model on the Target page, the transformation places the generated classes in a package named, ClassToServiceOutput, in the target model.


Transformation Details

Transformation Source

This transformation accepts a UML model or a package or a class as the source. The model should have ClassToService profile applied to it.

Transformation Target

This transformation accepts a model or a package as its target.