celeo (Haugommard, 2011; Obeo, 2011). This cov-
ers both code and document generation. Unfortu-
nately, little has been done in the area of model to
text traceability: most solutions essentially focus on
code (Olsen and Oldevik, 2007). For documents, the
approach is rather unidirectional and requires to cor-
rect the model and regenerate the document. Direct
integration with text processors is also missing while
most users are far more familiar with such software
than with a modelling tool.
On the other hand, direct synchronisation between
a model and related documents can also be achieved
by using a Domain Specific Language (DSL) used
to capture the document structure. Popular DSL im-
plementations like XText (Efftinge., 2006) have their
own underlying model with a quite direct (i.e. bijec-
tive) mapping with the engineering model that makes
the model to model synchronisation easier (Hettel
et al., 2008). However, again such techniques cannot
be applied inside text processors.
As a result, most commonly reported practices are
either that people spend a lot of time to locate the
model elements they have to correct w.r.t. a problem
noticed in a document (e.g. a typo), or they just do
not update the model, meaning they manually correct
documents again and again, and probably lose some
changes. Our motivation to tackle this problem actu-
ally comes from requests of industrial users having to
face such costly overheads which strongly impact the
efficiency of a MDE approach in their domain.
This short paper reports on our work to address
the above limitations by proposing a practical archi-
tecture that can cope with modelling frameworks on
one side, and mainstream (Open Source or commer-
cial) office suites on the other side. We describe a
global architecture covering both model to document
and document to model interactions. However, our
prototyping will focus on the later and less covered
topic. We consider the following three scenarios:
• Locate an element in a model from a text docu-
ment.
• Perform direct edition of a modelling element
from a text document.
• Create a new modelling element from a text doc-
ument.
In order to validate that our approach can be used
in practice, we demonstrate its use on two different
modelling environments: a requirements engineering
tool named Objectiver (Respect-IT, 2011), and the
Capella System Engineering platform (Polarsys/CIS,
2015). We also cover different targets: MS Word
documents, Open/Libre Office text documents and
HTML documents.
This paper is structured as follows. First, Section
2 presents the proposed architecture. Then, Section 3
details our implementation on the mentioned targets.
Section 4 discusses it in the light of related works.
Finally, section 5 concludes with the current status of
our research and the next envisioned steps.
2 REFERENCE ARCHITECTURE
2.1 Overview
The proposed architecture is depicted on Figure 1.
The left part of the picture represents the (system)
modelling environment while the right part is the Of-
fice environment. Although we will restrict to text
document for the rest of the paper, the architecture
is general and can also be applied to spreadsheets.
In the figure, white components are standard compo-
nents like the modelling environment (e.g. Capella),
the modelling repository (e.g. EMF), document gen-
eration libraries (GenDoc/M2DOC/FOP) and office
suites (MS Word, Writer). The grey components
are additions that need to be implemented to ensure
the correct support for the envisioned synchronisation
scenarios. The rest of this section will describe them.
2.2 Initial Document Generation
This step is done using the model to text library.
Model elements that need to be kept synchronised are
tagged with a unique model identifier so they can be
traced later. This information can be embedded using
a custom field of the target format (docx/odt/html).
Once generated the document can be transferred
and opened automatically in the target office platform
(or browser in case of HTML generation) using the
standard integration API of those components.
2.3 Model to Document Update
If the model is changed then the related documents
need to be updated. For this purpose, documents must
be kept in the model workspace. The update can be :
• an incremental update of traced elements: the ref-
erenced are updated through the server API of the
target office platform (e.g. OLE for MS Office,
UNO for Open/Libre Office). If some model el-
ement are removed, their reference is marked as
deleted or,
• in case of full update, the whole document is re-
generated using the same process as the initial
document generation.
Three update scenarios are possible:
MODELSWARD 2018 - 6th International Conference on Model-Driven Engineering and Software Development
568