# Towards a Domain-Specific Modeling Language for Extracting Event Logs from ERP Systems
## 4 Domain-Specific Modeling Language for Extracting Event Logs
### Abstract Syntax  
The specification of the essential domain concepts and relationships between them is the central part of designing a DSML. It is composed of a metamodel, where the attributes and associations of the language concepts are defined, as well as the corresponding constraints. We chose to specify restrictions and semantic properties of the DSML elements more through the abstract syntax than by adding a larger number of model constraints. By defining fewer additional constraints, the comprehensibility and readability of a metamodel can be improved. Also, the correctness of a model can be checked at the class level [27]. To define the abstract syntax of a language, a metamodel has been created using the Unified Modeling Language (UML) class diagram [28]. A UML class diagram used as its metamodeling language is easier to understand by domain experts and the format is widely accepted for conceptual modeling in industrial fields. The UML metamodel is compliant with the Meta-Object Facility (MOF) standard [29]. Figure 4 shows the main metaclasses in our metamodel, along with their attributes and relationships. The metamodel refers to the existing structure of the XES standard. The XES standard enforces the general structure of an event log containing the log, trace, event, and attribute objects. All information is stored in attributes where the semantics are clearly defined using extensions. It is possible to enrich the format with new domain-specific attributes for standard entities; however, extensions cannot be used to include new entities and structures to store additional information. The data perspective is missing in the XES, thus, the new metamodel proposed in this work describes necessary elements related to data objects within a process flow that are interesting for process mining analysis. The main construct of the metamodel is the artifact, which refers to the key business objects, i.e., documents. A business document structure typically contains a header and a set of lines, such as a purchase order header and line item detail. A parent-child relationship is used to associate one document header with its many lines in a database. A document header table contains general information of a transaction, while a document line captures specific line item properties. Note that transactions refer to operations on a complete document or only to a line of a document. A purchasing transaction, for example, to approve an order is linked to a purchase order header. Hence, both the header and line are subsumed in the abstract artifact entity type, which can be associated with several  
Figure 4: Abstract syntax of the DSML for supporting event log extraction from ERP systems. transactions by means of the relationship called the \"object of transaction\" in the metamodel. Each transaction in turn belongs to exactly one artifact. The artifacts are connected to each other via direct or indirect relations. A relation holds a link from a source artifact to a target artifact. A direct relation specifies the reference linking the two artifacts, while an indirect relation is constituted of two or more direct links. This is performed using an attribute called \"join path\". We have only represented the main metaclasses of XES metamodel to facilitate the comprehension of relations between the language elements and the elements of XES. The elements are linked using dependency relationships. This relationship indicates the dependencies between an XES element and the element of the presented metamodel for transformation implementation. The XES log element will use the artifact type log metaclass for defining a case notion to correlate events. The artifact type log metaclass has a \"main artifact ID\" property referencing the artifact element whose instances can be related to XES trace elements. There may only be one main artifact, and it represents a case notion.