Profile

A profile in MDWorkbench enables you to enhance a metamodel with dynamic metatypes. Scripts can then be attached on these new metatypes, allowing the use of polymorphism and inheritance rather than 'if' statements in a script's implementation.

For example, in UML, rather than testing in a script if a Class has a stereotype "EJB" and returning a different value based on this test, one can :

  1. add a "Class:EJB" metatype using a profile
  2. redefine the script on the "Class:EJB" metatype to customize the returned value,
  3. suppress the 'if' statement in the Class script, as the test is now metatype-based.

To enable profile capability, the metamodel must define a profile provider, which is used to determine the metatype of a model element. This has already been done for the UML metamodels.

Related tasks
Adding profile capability