Analysis of Decision Model and Notation Tooling in the Visual Studio Code Ecosystem

Analysis of Decision Model and Notation Tooling in the Visual Studio Code Ecosystem

Masaryk University Faculty of Informatics Analysis of Decision Model and Notation tooling in the Visual Studio Code ecosystem Master’s Thesis Bc. Marcel Mráz Brno, Spring 2021 Masaryk University Faculty of Informatics Analysis of Decision Model and Notation tooling in the Visual Studio Code ecosystem Master’s Thesis Bc. Marcel Mráz Brno, Spring 2021 This is where a copy of the official signed thesis assignment and a copy ofthe Statement of an Author is located in the printed version of the document. Declaration Hereby I declare that this paper is my original authorial work, which I have worked out on my own. All sources, references, and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Bc. Marcel Mráz Advisor: Bruno Rossi, PhD i Acknowledgements I would like to express my gratitude to my thesis advisor Bruno Rossi, PhD, for valuable guidance during consultations. Also, I would like to thank Adacta for the opportunity to combine study and work life. Additionally, I would like to thank my family and close ones for their support. ii Abstract Decision Model and Notation (DMN) is a standard specifying a vi- sual notation and a lower-level Friendly Enough Expression Language (FEEL) for the definition of interchangeable and executable decision models. The definition and maintenance of such models is contin- uously being improved with the emerging tooling ecosystem built around DMN graphical editors. One of the requested features in- side such editors is the ability to provide language features, such as DMN model validation and FEEL completion on each content change and request, respectively. Simultaneously, Language Server Protocol (LSP) provides a convenient way to provide such language features for text-based languages and specifications across a number of different development tools and text-based editors, such as Visual Studio Code. In addition to text-based editors, Visual Studio Code offers a way to create custom graphical editors, allowing to embed a DMN graphical editor inside its user interface. This thesis reviews the concepts of DMN and its validations, LSP and related Visual Studio Code API for graphical editors and researches the related questions for providing DMN language features through the use of LSP inside the embedded graphical editors. As a result, an architecture using LSP for providing language features inside embedded DMN graphical editors is pro- posed. The proposed solution architecture is specifically designed to address related domain problems in the context of commercial, enterprise-level insurance software. iii Keywords DMN, FEEL, LSP, VS Code, Extension API, Custom Editor API, Web- view API, Node.js, Software Architecture, Static Code Analysis, Adacta, AdInsure Studio iv Contents 1 Introduction 1 1.1 Problem domain . .2 1.2 Thesis statement . .5 1.3 Research questions . .5 1.4 Thesis structure . .7 2 Decision Model and Notation 9 2.1 Overview . 10 2.2 Use cases . 11 2.3 Outline of specification . 13 2.3.1 FEEL . 14 2.3.2 DRD and its elements . 15 2.3.3 Boxed expression types . 17 2.3.4 Conformance level . 19 2.4 Related standards . 21 2.4.1 CMMN . 22 2.4.2 BPMN . 22 2.4.3 PMML . 23 3 DMN model validation 24 3.1 Market overview . 25 3.1.1 Vendors and involved parties . 27 3.2 Validation breakdown . 30 3.2.1 Validation against the schema . 31 3.2.2 Validation of DRD and its elements . 31 3.2.3 Validation during compilation process . 31 3.2.4 Validation of FEEL expressions . 32 3.2.5 Validation of a decision table . 32 v 3.2.6 Dynamic validation . 33 4 Language Server Protocol 34 4.1 Overview . 35 4.2 Architecture . 38 4.2.1 Client, server and their capabilities . 38 4.2.2 JSON-RPC . 39 4.2.3 Communication flow . 40 4.2.4 Limitations . 41 4.2.5 Conclusion . 43 5 Visual Studio Code 45 5.1 Overview . 46 5.2 Electron.js . 47 5.3 Extension API . 49 5.3.1 TextDocument .................... 50 5.3.2 Text editor . 50 5.3.3 Webview API . 51 5.3.4 Custom Editor API . 51 5.3.5 Language extensions . 52 5.3.6 Conclusion . 53 6 Proposed solution 54 6.1 Requirements . 55 6.1.1 Functional requirements . 55 6.1.2 Quality attributes . 56 6.1.3 Technical constraints . 58 6.1.4 Business constraints . 59 6.2 Architecture . 60 6.2.1 Overview . 60 6.2.2 LSP language server . 61 6.2.3 DMN analysis . 62 6.2.4 DMN custom text editor . 66 6.2.5 Validation process example . 67 6.2.6 Possible integrations . 69 7 Conclusion 72 7.1 Research questions evaluation . 73 vi 7.2 Future work . 76 A List of Abbreviations 79 Bibliography 82 vii List of Figures 1.1 Hierarchy of explained AdInsure concepts 3 1.2 Visualisation of references between the research questions 6 1.3 Visualisation of the thesis outline 7 2.1 DRD and its elements 15 2.2 DMN conformance levels hierarchy 19 2.3 Linking business automation with machine learning 21 4.1 Interactions between a user, LSP client and LSP server 41 5.1 Electron.js application architecture 47 5.2 Class diagram showing conceptual relations between the mentioned concepts 50 5.3 SDK for development of VS Code’s LSP-based server 52 6.1 Dependencies between the separate packages 60 6.2 Main conceptual relations inside and outside of the language server 61 6.3 Main conceptual infrastructure of DMN analysis package and its dependencies 63 6.4 DMN analysis package infrastructure and its dependencies 67 6.5 Integration architecture of utilizing multiple language servers for multiple custom text editors 71 viii 1 Introduction This chapter focuses on explaining the problem domain and related context. Based on the context, research questions are defined, and the overall structure of the thesis is explained and visualised. 1 1. Introduction 1.1 Problem domain The problem is defined in the context of two systems - AdInsure [1] and AdInsure Studio [2]. AdInsure and AdInsure Studio are software products developed by Adacta, a Slovenian-based company with of- fices spread across major European cities, starting with headquarters in Ljubljana and continuing with Maribor, Belgrade, Zagreb, Moscow and Brno. Adacta is, with more than 30 years of experience, the soft- ware provider for the insurance industry. AdInsure is an insurance platform, and its newest version is de- signed, apart from other things, with configurability in mind, allowing configuration of all of its infrastructural and business elements. AdIn- sure Studio is what makes the configuration of AdInsure and all of its elements quick, convenient and business-user friendly. AdInsure Studio supports the entire configuration lifecycle of insurance prod- ucts and business processes mainly through its Visual Studio Code extension client1, supporting multiple authoring modes and focusing on a broad audience reaching from developers and testers to business analysts and actuaries. There are two AdInsure Studio extension authoring modes relevant to the problem2: • Basic mode (default): A mode focused on business users and configuration of products and processes using custom made Graphical User Interface-centered (GUI-centered) editors and business user friendly explorers. • Expert mode: A mode focused on AdInsure domain experts, such as configurators and developers, allowing the configuration of products and processes using plain built-in text editors. Many configuration concepts3 defined by the AdInsure platform are supported by both of these modes, with one such concept be- 1The other AdInsure Studio client is Command Line Interface (CLI) for auto- mated purposes, such as the use during continuous integration and continuous delivery (CI/CD). 2The third mode is called "Accelerated mode" and is used for rapid configuration of products and processes using scaffolding technique. 3All of such concepts are defined as textual files, structured mostly using follow- ing formats - .js, .json, xml, csv. 2 1. Introduction ing a business rule configuration. One way to configure a business rule in AdInsure, using AdInsure Studio extension, is by using the Decision Model and Notation (DMN), which is a higher, visual lan- guage focused on the definition of business decisions. In terms of AdInsure Studio modes, it means either to edit the DMN file using a GUI-centered editor (a custom DMN editor or, in Adacta’s Ubiquitous Language4, so-called Rule editor) or a built-in text editor (Monaco editor5). Figure 1.1: Hierarchy of explained AdInsure concepts 4Ubiquitous Language is a term for specifying common language between devel- opers and other stakeholders, used by Eric Evans in Domain Driven Design [3]. 5Monaco editor is a standalone text-editor that powers VS Code [4]. 3 1. Introduction The problem is that neither the custom Rule editor nor AdInsure Studio provides any DMN model validations. From the configuration perspective, it implies that it is possible to create an invalid DMN model (thus an invalid business rule), which might cause problems during its evaluation in the AdInsure run-time environment. Such issues detected in the run-time environment can be very costly and pro- long the development time, testing time, and overall time-to-market for the given product, which are the exact attributes that DMN and AdInsure Studio are trying to solve. As it is possible to create an invalid DMN model and pass it to the run-time environment, it is necessary to detect the potential problems as soon as possible. In terms of AdInsure Studio, it means detecting such problems within the VS Code extension during the DMN model authoring phase in both related modes (Basic and Expert).6 Moreover, AdInsure Studio includes the concept of validations for other configuration concepts specified by the AdInsure platform.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    98 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us