Jump to: navigation, search

STP/IM Component/Transformation Approaches/From BPMN/Declarative

When creating a metamodel with Ecore, EMF is able to generate several Java code utilities that help in the creation of models conforming to these metamodel (e.g. business process models conforming to the BPMN metamodel). These APIs are pretty straightforward and easy to learn, so they provide a very easy alternative for model transformations, and even more the transformation developer is also able to take advantage of Java's flexibility to achieve the desired mapping.

However, there's two issues with this approach:

  • As Java is an imperative language, this will make the transformation algorithm be imperative as well; however the preferred style for model transformations is a declarative one, which allows the developer to more cleanly determine what elements the source model will become in the target model.
  • Along with the transformation logic, additional Java code will have to be written to address other concerns such as persisting the models, managing resources, handle workspace operations (in the case of Eclipse applications) and so on.
  • After a transformation is developed, it is possible that later on the developer wants to change the conceptual mapping and therefore the transformation rules, or also the source or target metamodels could change. However, making changes to transformation rules defined in an imperative way won't be as easy as if they were defined declaratively.

The OMG consortium has proposed a standard for model-to-model transformations called QVT, for which Eclipse already provides more than one implementation in the M2M component of the Modeling project. One of these tools, called Atlas Transformation Language (ATL), has been used to develop a declarative approach for the BPMN to IM transformation.

Transformation Rules

Rule Name Description
BpmnDiagram2IM The main rule; A BPMN diagram becomes an Intermediate Model instance.
Pool2Process All of the diagram's pools become processes in the IM.
Activity2Step Every pool's activities become steps of the respective process in the IM.
SequenceEdge2Transition Every pool's sequence edges become transitions of the respective process in the IM.
Subprocess2StartEndSteps If the BPMN diagram contains grouped activities in subprocesses, these are flattened and surrounded with start and end steps of the subprocess. E.g. if in the BPMN diagram there is subprocess X which contains activities X1 and X2, the generated steps sequence will look like "X -> X1 -> X2 -> End.X". The corresponding transitions between these steps are created.
Artifact2Variable Each artifact in the BPMN diagram becomes a process variable in the IM.


See bug 235005.